By default, warnings emitted by warnings.warn() will show on stderr. For
a TUI application, this is a problem because they will be displayed over
the UI and create visual glitches.
For parts of the UI that are regularly redrawn, the text of the warning
will eventually go away (sometimes instantly, making the warning
impossible to read).
For parts of the screen that are *not* regularly redrawn, the text of
the warning will stay until the user sends a Ctrl-L sequence.
We now make use of logging.captureWarnings() to redirect the warnings to
the log files. This prevents the UI glitches and if any warning is
emitted, we can actually find it in the logs.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Adds an option to configure the VM to load SecureBoot enabled firmware.
SecureBoot is a feature of UEFI, which means --boot (for legacy BIOS
boot) is incompatible with this flag. Providing both will result
in an error.
This will be useful for testing MOK enrollment behavior, as on reboot
you can confirm if you are presented with mokmanager or regular first
boot.
The local disk that scripts/kvm-test.py creates unconditionally uses the
virtio interface. Recently in Subiquity, we did some work more closely
related to NVMe drives but kvm-test.py did not support that type of
interface.
We now add the possibility to specify the interface using the
--disk-interface option. It can only take two options:
* --disk-interface nvme
* --disk-interface virtio (the default)
This should allow us to spot regressions (such as in LP: #2056730) with
more ease.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
A new builtin curthook was introduced to address copying over
common metadata from /cdrom/.disk/ at install time. This addressed
copying /cdrom/.disk/info and /cdrom/.disk/ubuntu_dist_channel
(LP: #2037038).
Adds support for AutoinstallValidation errors, the first class
of non-reportable errors. Includes a separate error overaly to
display a warning to the user about the issue.
Changes to the server to allow restarting the installer before all
of the controllers are loaded, since the error means the controllers
won't ever be loaded. Adds special handling to the ProgressView to
change the Reboot (the machine) button to a Restart (the installer) button
for this case.
Currently, installations of Ubuntu Server and Ubuntu Desktop both fail
on UEFI-based systems because of a grub2 bug. This is a workaround to
avoid failing installs until grub2 migrates to the release pocket.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Now that curtin more or less supports NVMe over TCP with the rootfs on
remote storage, relax the contraints set by subiquity.
We still need the /boot (and /boot/efi) partitions on local storage
though.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Change when the server discovers if the install is interactive or not.
This allows clients to display autoinstall errors in an interactive
way, if applicable. This also enables accessing the ssh_info endpoint
before all of the controllers are loaded. Autoinstall loading happens
after the loading cloudinit stage, so this should be accessible by then.
If a failure happens during/before cloudinit is finished, `interactive`
will still be set to `None` and clients should default to the
non-interactive case.
Adds a field to the ApplicationStatus struct, nonreportable_error,
to be filled when the server enters an error state due to a
non-reportable error/exception type.
When importing a key on a terminal with limited capabilities, the UI can
crash with:
File "urwid/canvas.py", line 1315, in apply_text_layout
return TextCanvas(t, a, c, maxcol=maxcol)
File "urwid/canvas.py", line 358, in __init__
raise CanvasError("Canvas text is wider than the maxcol [...]
urwid.canvas.CanvasError: Canvas text is wider than the maxcol specified
When a SSH key is too long to be displayed on the terminal, we clip the
end and show the ellipsis "…" character instead. It is supposedly 1
column wide but it reverts to "..." (3 columns wide) on terminals with
limited capabilities.
The bug seems fixed in urwid in noble but we're using core22 for now.
Let's not try to show the character until we switch to core24 (or until
the bug is fixed in jammy).
LP: #2055702
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Inspect cloud-init status for disabled. When disabled do not
call stages.Init due to a side-effect that cloud-init tries to
rediscover any viable datasource when none are previously
discovered.
LP: #2055077