When the request to v2/systems/enhanced-secureboot-desktop (or
equivalent) fails, Subiquity did not capture the reason. This makes
it difficult to understand why this call sometimes fails. We now log the
response text to understand better what's going on.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Automated installations and desktop installations will now switch to an
offline installation by default. In this mode, only packages from the
pool will be fetched.
This should allow the installation to proceed when installing from a
private network without external access to the internet.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
On first boot, there appear to be cases where the cc_dpkg_grub module in
cloud-init is not doing the right thing, which are to be sorted out.
But for first boot to happen we have a working boot config, so let's not
perturb that.
LP: #2060695
Partial implementation of LP: #2057837. To create a specific dataset
for /home/$user, this requires moving where and when users are created,
which is not in plan for 24.04.
Check for any changed .rst files in the doc/ directory and run
`make spelling` if any changes are detected.
The files directives per hook have to be more restrictive than the
global hook, so this also slightly changes the files match for
the other hooks.
In cda6c54b87, we introduced the accurate
size vs human readable size for the size form fields. Unfortunately, we
also introduced a regression when the size gets capped (when it exceeds
the maximum size defined on the form). Currently, specifying a size that
is beyond the maximum value fails when submitting the form with:
[...]
File "urwid/wimp.py", line 543, in keypress
self._emit('click')
File "urwid/widget.py", line 461, in _emit
signals.emit_signal(self, name, self, *args)
File "urwid/signals.py", line 265, in emit
result |= self._call_callback(callback, user_arg, user_args, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "urwid/signals.py", line 295, in _call_callback
return bool(callback(*args_to_pass))
^^^^^^^^^^^^^^^^^^^^^^^
File "subiquitycore/ui/form.py", line 486, in _click_done
emit_signal(self, "submit", self)
File "urwid/signals.py", line 265, in emit
result |= self._call_callback(callback, user_arg, user_args, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "urwid/signals.py", line 295, in _call_callback
return bool(callback(*args_to_pass))
^^^^^^^^^^^^^^^^^^^^^^^
File "subiquity/ui/views/filesystem/partition.py", line 636, in done
handler(self.disk, spec, partition=self.partition, gap=self.gap)
File "subiquity/common/filesystem/manipulator.py", line 334, in logical_volume_handler
lv.size = align_up(spec["size"])
^^^^^^^^^^^^^^^^^^^^^^
File "subiquity/models/filesystem.py", line 1382, in align_up
return (size + block_size - 1) & ~(block_size - 1)
~~~~~^~~~~~~~~~~~
TypeError: unsupported operand type(s) for +: 'BoundFormField' and 'int'
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Also deletes a note to users about not needing the autoinstall keyword
in non cloud-config delivery methods. We should keep a hint in the reference
that this is available, but generally let's always suggest to use the
top-level autoinstall keyword.
Users attempting to do autoinstall may incorrectly send autoinstall
directives as cloud-config, which will result in cloud-init
schema validation errors. When loading autoinstall from cloud-config,
we now check to see if there are any cloud-init schema validation errors
and warn the user. Additionally, if the source of the error is from
a known autoinstall error, we inform the user and halt the installation
with a nonreportable AutoinstallError.
When a partition is mounted in the live environment (either by casper or
another process) and is selected for resize, curtin will fail when
running e2fsck (or equivalent) with an error such as:
Resize requested for format ext4
Resizing /dev/sdb4 of type ext4 down to 12546211840
Running command ['e2fsck', '-p', '-f', '/dev/sdb4'] with allowed return codes [0] (capture=False)
/dev/sdb4 is mounted.
e2fsck: Cannot continue, aborting.
An error occured handling 'disk-sdb': ProcessExecutionError - Unexpected error while running command.
Command: ['e2fsck', '-p', '-f', '/dev/sdb4']
Exit code: 8
This is what happens when casper creates a partition on the installer
media to store /var/log and /var/crash. Usually the partition is large
enough to install Ubuntu so a GuidedStorageTargetResize scenario gets
emitted.
This patch prevents the emission of a GuidedStorageTargetResize scenario
if the partition is marked as mounted already.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
To workaround a grub2 bug (LP: #2055294) causing 24.04 installations to
fail, we added a default debconf-selection in Subiquity.
grub2 2.12-1ubuntu4 fixes the issue and migrated to the noble release
pocket on 2024-03-06.
We can now drop the workaround.
https://launchpad.net/ubuntu/+source/grub2/2.12-1ubuntu4
This reverts commit cffce32305.
Subiquity currently ignores invalid top-level keys, but this has likely
been a major source of confusion of autoinstall capabilities.
In future versions, the following autoinstall config will throw an
AutoinstallValidationError:
version: 2
interactive-sections:
- identity
literally-anything: lmao
This patch adds warnings for version 1 and will begin to throw
an AutoinstallValidationError on these instances in version 2 once
it has been enabled.
On recent installations of Ubuntu, the zzzz-installer-unattended-upgrade
file ended up in the etc/apt/apt.conf.d directory of the target system.
It is supposed to be a temporary file intended for one time invocation
of unattended-upgrade at the end of the installation.
Let's remove the file after unattended-upgrades finishes using a
try ... finally construct.
The previous implementation was doing the call to UU inside the
with open(...) block, after a manual call to .close(). This is
unnecessary, the file is automatically closed at the end of the with
block.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
This should not result in a format object being created, which curtin
doesn't like. Normalize to None as the fstype to skip format object
creation.
LP: #2058394