Commit Graph

5725 Commits

Author SHA1 Message Date
Olivier Gayot e47f667e15
Merge pull request #1324 from ogayot/remove_overlay_no_overlay_ok
ui: avoid crashing when removing overlay that does not exist
2022-12-12 09:09:19 +01:00
Carlos Nihelton 1647a98ce3
Removes the now unused install_running
variable and module.
2022-12-09 11:59:31 +00:00
Carlos Nihelton 6d6e1e7854
Removes the switch to shell widget
From the summary controller when installation is in progress.
The shell is inoperable on WSL due the fake snap environment.
2022-12-09 11:44:08 +00:00
Dan Bungert c7f79b8a41
Merge pull request #1515 from dbungert/lp1999173-fix-delete-raid
filesystem: fix raid deletion
2022-12-08 14:54:02 -07:00
Michael Hudson-Doyle 6e1c42c385
Merge pull request #1514 from mwhudson/remove-aio_loop
Remove Application.aio_loop attribute
2022-12-09 10:53:50 +13:00
Dan Bungert 87f104d8b5 filesystem: do not break on raid removal
This logical partition handler can be moved up to _device, and this is
needed in case we are doing removals of anything that isn't a Disk.
2022-12-08 12:31:10 -07:00
Dan Bungert 1898224c5f examples: machine config for raid1 delete crash
To produce the crash, simply use this machine config in dry run, do
manual partition, and attempt to delete the md device.
2022-12-08 12:30:09 -07:00
Michael Hudson-Doyle 50ac03eacb Remove Application.aio_loop attribute 2022-12-08 12:52:14 +13:00
Michael Hudson-Doyle f0ae0a0bfb
Merge pull request #1512 from mwhudson/remove-_run_scripts
remove --script/--click command line arguments
2022-12-08 12:51:52 +13:00
Olivier Gayot 163e6cfb4a ui: make not_found_ok false by default for overlays and pass it where needed
Attempting to close an overlay that does not exist is pretty much always
a bug in the code. Making not_found_ok true by default will hide obvious
bugs from us ; which is not a good thing. Perhaps more importantly, we
might just remove the wrong overlay.

Instead, we should just pass not_found_ok=True as a workaround when we
know the code is buggy and don't have time to fix the bug cleanly.

This is what happens for SSH keys import. If the import fails, we remove
the loading animation. However for answers-based runs, we do not have a
loading animation so the code bails. Let's add not_found_ok=True in this
context and we can fix the code later.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-12-07 10:31:15 +01:00
Olivier Gayot 4025cbf97f ui: avoid crashing when removing overlay that does not exist
BaseView.remove_overlay() would crash with AttributeError if no overlay
was found. We now add a not_found_ok parameter (defaulting to True) that
makes the function silently return if the overlay could not be found.

Passing not_found_ok=False and catching OverlayNotFoundError can be
helpful in some scenarios to do something different if no overlay was
found.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-12-07 10:31:05 +01:00
Olivier Gayot 0bee338420
Merge pull request #1507 from ogayot/mixed-sources-description
mixed-catalog: rework description and name of entries
2022-12-07 09:45:00 +01:00
Michael Hudson-Doyle 06d7f04032 remove --script/--click command line arguments
I implemented these a long time ago to help working on parts of the ui
by allowing a way to script moving past some screens. I haven't used
them in ages, it's pretty bad code and probably a fragmentary answers
file is a better solution to the same problem. What do you think?
2022-12-07 14:56:00 +13:00
Michael Hudson-Doyle b510afbc65
Merge pull request #1510 from mwhudson/broadcast-confirmation
document InstallerChannels and add INSTALL_CONFIRMED event
2022-12-07 14:41:42 +13:00
Michael Hudson-Doyle 09defa104b
Merge pull request #1511 from mwhudson/spinner-no-loop
rewrite Spinner to not require a loop parameter
2022-12-07 14:41:21 +13:00
Michael Hudson-Doyle 7aab0b5de4 rewrite Spinner to not require a loop parameter 2022-12-07 14:19:27 +13:00
Michael Hudson-Doyle 491cb9191f document InstallerChannels and add INSTALL_CONFIRMED event 2022-12-07 14:07:41 +13:00
Dan Bungert 0e846cd88c
Merge pull request #1509 from dbungert/journald-no-loop-pass
journald: stop passing a loop
2022-12-06 18:02:11 -07:00
Dan Bungert 83b2561919 journald: stop passing a loop
Per python 3.10 changelog[1], passing a loop around is no longer
considered a good idea.  Remove the loop argument and request the
running loop.

[1]: https://docs.python.org/3/whatsnew/3.10.html#removed
2022-12-06 16:58:21 -07:00
Dan Bungert 1cf75adb7f
Merge pull request #1508 from dbungert/integrity-journald
integrity: use journald integration
2022-12-06 16:27:58 -07:00
Dan Bungert 8eeb9c1589 integrity: better wait on the done event 2022-12-06 16:01:05 -07:00
Dan Bungert 8405b0c247 journald: extend matchers
* allow key=value matchers
* add journald_get_first_match to simplify fetching a single event
2022-12-06 15:58:13 -07:00
Dan Bungert 53246511a6
Merge pull request #1506 from dbungert/casper-md5check-log
integrity: add md5 check integration
2022-12-06 14:19:35 -07:00
Dan Bungert cd8667d6a1 integrity: add md5 check integration
* log the results of the md5 check
* if a failure and a crash occurs, mention that in the crash dialog
2022-12-06 14:08:51 -07:00
Olivier Gayot c7750c7fda mixed-catalog: rework description and name of entries
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-12-06 15:08:00 +01:00
Olivier Gayot 14b1e261ba
Merge pull request #1505 from ogayot/LP1998376
Drivers: make sure we suggest non-GPGPU drivers to the desktop installer
2022-12-06 15:03:31 +01:00
Michael Hudson-Doyle 6ea2eeb11e
Merge pull request #1502 from mwhudson/tpm-autoinstall
Support for autoinstalling a core boot classic system
2022-12-06 10:04:01 +13:00
Olivier Gayot 66c82b3227 drivers: query again list of drivers if the source variant changes
The list of drivers suggested to the user may vary based on whether we
are installing a server or desktop image / source.

In the current implementation of the drivers controller, the value of
the source variant (e.g., server or desktop) is read early in the
initializer.

This is a problem because it happens before the client gets the
opportunity to tell us if we are installing a server or a desktop image.

If the source variant ever changes, we want to query again the list of
drivers to suggest.

Upon configuring the source, the drivers controller will query (again)
the list of drivers.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-12-05 11:29:07 +01:00
Michael Hudson-Doyle dc0cd5a131 address review comments 2022-12-05 12:16:18 +13:00
Michael Hudson-Doyle 404856aaf6
Merge pull request #1503 from mwhudson/no-snaps-ssh-desktop
skip ssh and snaplist screens for desktop install
2022-12-02 11:40:57 +13:00
Olivier Gayot f2afda4e15 drivers: don't mark configured automatically, the client decides
The drivers controller used to mark the model configured automatically
if no drivers were found. This is okay in most cases but sometimes, we
want to query again the list of drivers (after the client_variant gets
set for instance) and we don't want the model to remain configured.

Let's leave this up to the client to decide if the model should be
configured.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-12-01 15:41:59 +01:00
Michael Hudson-Doyle f71de2e16d
Merge pull request #1504 from mwhudson/no-sshd
fix getting ssh info when sshd is not installed
2022-12-01 09:46:35 +13:00
Michael Hudson-Doyle 0db89dfc47
Merge pull request #1499 from mwhudson/fix-on_volumes
fix the value passed as on-volumes to snapd
2022-11-30 11:20:16 +13:00
Michael Hudson-Doyle 7c3e966356 fix getting ssh info when sshd is not installed 2022-11-30 11:12:51 +13:00
Michael Hudson-Doyle 9de44c95ec Support for autoinstalling a core boot classic system
This adds support for a 'hybrid' layout, which can only be used with a
core boot classic system (and no other style can be used).
2022-11-30 11:11:32 +13:00
Michael Hudson-Doyle a7af1cc5c2 fix the value passed as on-volumes to snapd
The data passed to on-volumes needs to indicate, for each "structure"
(partition) defined by the gadget the path to the underlying device. The
current code attempts to this by tracking the partition for each role
but this doesn't work: there maybe be more than one partition with no
role. So refactor to have the controller convert the "volume" structure
to an "on-volume" structure early and update the device fields after
curtin runs.
2022-11-30 11:11:07 +13:00
Michael Hudson-Doyle 71d18a7daa
Merge pull request #1496 from mwhudson/relax-alignment
do not round up partition size in add_partition
2022-11-30 11:04:54 +13:00
Michael Hudson-Doyle 36520a2d34 test and ensure that calculate_guided_resize returns aligned values 2022-11-30 10:55:52 +13:00
Michael Hudson-Doyle 44fca22175 maybe a good idea? 2022-11-30 10:55:51 +13:00
Michael Hudson-Doyle b61874a3f9 do not round up partition size in add_partition
I'm like 99% sure that all call paths to here align the size properly,
apart from the one in apply_system, which I want to be able to create
improperly sized partitions.
2022-11-30 10:54:53 +13:00
Michael Hudson-Doyle bf2e233c6c
Merge pull request #1500 from mwhudson/apply-system-fixes
a few fixes for apply_system
2022-11-30 09:50:34 +13:00
Michael Hudson-Doyle f33a42aed2 skip ssh and snaplist screens for desktop install
If and when the desktop installer adds a snaps screen, we should
probably fetch information for a different set of snaps for a desktop
install. But for now this is OK.
2022-11-30 09:37:57 +13:00
Michael Hudson-Doyle 2419522462 set grub_device on ESP in apply_system
Some other code expects this to be there.
2022-11-30 09:36:42 +13:00
Michael Hudson-Doyle 8fd499593f recreate the partition table if no partitions are being preserved
I think at the end of the day this is not very important. But it seems cleaner somehow.
2022-11-30 09:36:42 +13:00
Michael Hudson-Doyle 0b6a829a1e always set partition type guid from gadget
Previously it only set it if the particular type guid was known to
curtin.
2022-11-30 09:36:42 +13:00
Michael Hudson-Doyle a96903e4da fix removing more than one partition when applying gadget data 2022-11-30 09:36:42 +13:00
Michael Hudson-Doyle 6fdceba167
Merge pull request #1501 from mwhudson/tpm-fstab-swap
create fstab and configure swap for core boot classic
2022-11-30 09:32:56 +13:00
Michael Hudson-Doyle 50ff026cad
Merge pull request #1488 from mwhudson/system-seed-null
add a new member of the snapdapi.Role enum
2022-11-30 09:08:34 +13:00
Michael Hudson-Doyle 6bb8baee59
Merge pull request #1498 from mwhudson/better-logs
improve a few log messages and file paths
2022-11-30 06:36:55 +13:00
Dan Bungert 8ce87d9656
Merge pull request #1497 from mwhudson/curtin-update
update curtin to get swap, quick_zero, first-lba fixes
2022-11-29 10:28:30 -07:00