37f286ac93
When running an autoinstallation with only “network” as an interactive section, the installation hanged after the following steps: finalizing installation running 'curtin hook' curtin command hook executing late commands where in normal conditions, the next step is: final system configuration Also, querying the meta/status endpoint at this point shows that the app is in POST_WAIT state. The problem is: the network model is declared as both an “install” model and a “postinstall” model (it is the only one we have AFAIK) when calling .configured() for a given model, we only trigger /at max/ one event. Either: * install_event (if the model is an “install” model - and it is the last one configured) * postinstall_event (if the model is a “postinstall” model but not an “install” model - and it is the last one configured) * no event (as in most cases) So when we call .configured() for the network model, we /can/ trigger the install_event but can never trigger the postinstall event. Therefore Subiquity, will wait forever until something triggers the postinstall_event Fixed by accepting to trigger the install_event and the postinstall_event in a single call to .configured. Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com> |
||
---|---|---|
.github/workflows | ||
bin | ||
console_conf | ||
debian | ||
examples | ||
fake_deps | ||
font | ||
kbds | ||
po | ||
scripts | ||
snap/hooks | ||
subiquity | ||
subiquitycore | ||
system_setup | ||
.flake8 | ||
.gitignore | ||
DESIGN.md | ||
LICENSE | ||
Makefile | ||
README.md | ||
autoinstall-schema.json | ||
autoinstall-system-setup-schema.json | ||
languagelist | ||
requirements.txt | ||
reserved-usernames | ||
setup.py | ||
snapcraft.yaml | ||
tox.ini | ||
users-and-groups |
README.md
subiquity & console-conf
Ubuntu Server Installer & Snappy first boot experience
The repository contains the source for the new server installer (the "subiquity" part, aka "ubiquity for servers") and for the snappy first boot experience (the "console-conf" part).
We track bugs in Launchpad at https://bugs.launchpad.net/subiquity. Snappy first boot issues can also be discussed in the forum at https://forum.snapcraft.io.
Our localization platform is Launchpad, translations are managed at https://translations.launchpad.net/ubuntu/+source/subiquity/
To update translation template in launchpad:
- update po/POTFILES.in with any new files that contain translations
- execute clean target, i.e. $ debuild -S
- dput subiquity into Ubuntu
To export and update translations in subiquity:
- Wait for new subiquity to publish
- Request fresh translation export from Launchpad at https://translations.launchpad.net/ubuntu/focal/+source/subiquity/+export
- wait for export to generate
- download, unpack, rename .po files into po directory, and commit changes
Acquire subiquity from source
git clone https://github.com/canonical/subiquity
cd subiquity && make install_deps
Testing out the installer Text-UI (TUI)
Subiquity's text UI is available for testing without actually installing anything to a system or a VM. Subiquity developers make use of this for rapid development. After checking out subiquity you can start it:
make dryrun
All of the features are present in dry-run mode. The installer will emit its backend configuration files to /tmp/subiquity-config-* but it won't attempt to run any installer commands (which would fail without root privileges). Further, subiquity can load other machine profiles in case you want to test out the installer without having access to the machine. A few sample machine profiles are available in the repository at ./examples/ and can be loaded via the MACHINE make variable:
make dryrun MACHINE=examples/simple.json
Generating machine profiles
Machine profiles are generated from the probert tool. To collect a machine profile:
PYTHONPATH=probert ./probert/bin/probert --all > mymachine.json
Testing changes in KVM
To try out your changes for real, it is necessary to install them into an ISO. Rather than building one from scratch, it's much easier to install your version of subiquity into the daily image. Here's how to do this:
-
Build your change into a snap:
$ snapcraft snap --output subiquity_test.snap
-
Grab the current version of the installer:
$ urlbase=http://cdimage.ubuntu.com/ubuntu-server/daily-live/current $ isoname=$(distro-info -d)-live-server-$(dpkg --print-architecture).iso $ zsync ${urlbase}/${isoname}.zsync
-
Run the provided script to make a copy of the downloaded installer that has your version of subiquity:
$ sudo ./scripts/inject-subiquity-snap.sh ${isoname} subiquity_test.snap custom.iso
-
Boot the new iso in KVM:
$ qemu-img create -f raw target.img 10G $ kvm -m 1024 -boot d -cdrom custom.iso -hda target.img -serial stdio
-
Finally, boot the installed image:
$ kvm -m 1024 -hda target.img -serial stdio
The first three steps are bundled into the script ./scripts/test-this-branch.sh.