When setting up the logging in a strictly confined snap, use the 'root' group,
rather than 'adm'. This will not interfere with the sandbox's policy but also
does not result in providing wider access to the logs.
Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
_AsyncValidatedMixin has been merged into the parent UsernameEditor,
reluctantly. I like the concept of _AsyncValidatedMixin, but what's
happening here is that UsernameEditor has inherited from 3 classes, the
first of which is in urwid, and when the constructor /
super().__init__() status changed in urwid,
_AsyncValidatedMixin.__init__() stopped being called.
OK cool, so maybe we'll just manually run initializers in the case where
it matters. That's semi-better, but with old urwid we end up calling
_AsyncValidatedMixin.__init__() twice (once directly, once by the urwid
__init__ using super()).
Further workarounds could be employed but at the moment there is one
user of _AsyncValidatedMixin, so just merge it into UsernameEditor.
Instead of manually changing the autoinstall-schema reference,
use literalinclude to insert the autoinstall-schema.json file
from the root of the repository.
The SSHModel contained a ssh_import_id member variable. According to the
comment, it was originally meant to store meta-data about a SSH key ;
and was supposed to allow showing some sort of info back in the SSH view
if the user decides to go back.
I suspect that this variable has been unused for a long time.
Furthermore, it can only hold information about a single SSH key and we
support multiple keys..
Let's get rid of it.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Back when sources.list was always present, we would:
* move the contents of sources.list to sources.list.d/original.list
* write the CDROM info to sources.list so the CDROM cat be used as an
APT source
* restore the original sources.list file when .deconfigure() is called,
effectively discarding CDROM info
Nowadays, there is no guarantee that sources.list exists. So restoring
the contents of sources.list may mean deleting sources.list if it wasn't
present in the first place.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
When an error occurs during the execution of a "$ curtin install"
invocation, the associated bug report would be titled:
"install failed crashed with CalledProcessError"
This is not very user friendly and it does not immediately give any
insight on:
With the number of reports that we receive these days, I think
classifying these reports would make our life a bit easier, and possibly
make the users understand better what's going on.
This change adds a wat to detect if a bug report is the result of a
"$ curtin install" invocation failing. If it is, subiquity sets the
title of the bug report accordingly. Examples:
* "partitioning crashed with CurtinInstallError"
* "extract crashed with CurtinInstallError"
* "curthooks crashed with CurtinInstallError"
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
We know that running os-prober on some systems is slow, potentially very
slow, especially when multiple removable devices are present.
This results in many bug reports showing "block probing crashed with
TimeoutError".
For now, I suggest we double the probert timeout when os-prober is
involved.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
We backup the sources.list to a file in sources.list.d to be
able to insert our source first; if we do not have a sources.list
this is not necessary.
If an image uses ubuntu.sources, this logic also works fine as
sources.list that we write will be sourced before the ubuntu.sources.
We write out the autoinstall data to make the install repeatable
but this should also include a reference to the autoinstall
documentation to increase usability.
In Python < 3.11, when passing a coroutine to asyncio.wait, it would
automatically be scheduled as a task. This isn't the case anymore with
Python 3.11. Now passing coroutines to asyncio.wait fails with:
TypeError: Passing coroutines is forbidden, use tasks explicitly.
Let's ensure we schedule the coroutines as tasks before passing them on
to asyncio.wait.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Updates the readme to point to the contributing guidelines document.
Include sections about the Ubuntu Code of Conduct, Contributor
License Agreement, where to file bugs, and where to submit
changes.
Signed-off-by: Chris Peterson <chris.peterson@canonical.com>
Booting Desktop and server live installer ISOs comes with different
platform requirements. When running kvm-test, we now accept the name of
a profile via the --profile option.
Profiles provide default settings for memory, disk size and extra QEMU
options. For now, two profiles are hard-coded: "server" - which is the
default and "desktop".
For desktop, we use two vCPU, 8 GiB of RAM, a 20 GiB disk and pass the
-device qxl option.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>