Commit Graph

5247 Commits

Author SHA1 Message Date
Olivier Gayot 3f47c469aa
Merge pull request #1408 from ogayot/ubuntu-pro-mypy
ubuntu-pro: fix type hints for contract selection callbacks
2022-09-12 11:40:16 +02:00
Olivier Gayot 0565e34552
Merge pull request #1412 from ogayot/snaplist-fix-try-again
snaplist: fix crash when pressing "Try again" on snaplist
2022-09-12 11:25:14 +02:00
Olivier Gayot 00801c3b68 keyboard: move setupcon to keyboard model
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-09-12 11:17:54 +02:00
Olivier Gayot dcb2420846 snaplist: avoid showing snaplist screen on failure
When creating the UI for snaplist, if the server returns a FAILED status
when we request the list of snaps, we want to move on to the next
screen.

However, calling self.next_screen in the make_ui function while also
returning an actual view triggers a race condition. Depending on the
order of execution of the instructions (which are asynchronous), the
snaplist view can end up being shown even though we moved to the next
screen. This ends up doing funny things upon clicking done.

Fixed by raising the Skip exception after making sure we mark snaplist
configured.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-09-09 15:11:19 +02:00
Olivier Gayot 3222a04fb4 snaplist: fix crash when pressing "Try again" on snaplist
When pressing the "Try again" button on the snaps list, Subiquity would
crash with:

TypeError: SnapListView.wait_load() takes 1 positional argument but 2
were given

This happens because urwid passes the sender to the callback - which we
need to discard or accept it in the signature.

Fixed by discarding the sender.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-09-09 10:51:04 +02:00
Olivier Gayot 870c99bcce keyboard: fix wrong keyboard layout in initramfs
During the installation, in the curthooks stage, curtin generates the
initramfs. Unfortunately, the generated initramfs did not honor the
keyboard mapping selected by the user during installation. Therefore,
when LUKS encryption is used for the root file-system, the prompt for
the passphrase ignores the keyboard layout set by the user.

To ensure that the initramfs uses the right keyboard layout, the
/etc/console-setup/cached_* files must be updated before the initramfs
gets created. At the beginning of the curthooks stage, we now call
setupcon --save-only in the target to refresh those files if needed.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-09-08 13:13:38 +02:00
Olivier Gayot 003127054f ubuntu-pro: don't use keyword arguments for callables
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-09-07 09:37:01 +02:00
Olivier Gayot da6dd3af41 ubuntu-pro: fix contract-selection callbacks signatures
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-09-07 09:36:56 +02:00
Dan Bungert 76b1faed1a
Merge pull request #1407 from dbungert/curtin-cryptsetup
snapcraft: rev curtin for cryptsetup fix
2022-09-06 18:48:34 -06:00
Dan Bungert 53a97f1156 snapcraft: rev curtin for cryptsetup fix 2022-09-06 18:02:11 -06:00
Dan Bungert e4a7f43658
Merge pull request #1406 from dbungert/lp-1983265-netplan-gateway
network: use routes instead of gateway directives
2022-09-06 17:35:20 -06:00
Dan Bungert 9e0a90fc22 network: use routes instead of gateway directives 2022-09-06 16:44:12 -06:00
Dan Bungert 9a651f57de
Merge pull request #1405 from CarlosNihelton/fix-api-test
Respects the output base dir on server.spawn() on API tests
2022-09-02 08:51:43 -06:00
Carlos Nihelton 73b9190a59
Respects the output base dir on server.spawn()
On API tests
2022-09-02 09:17:07 -03:00
Dan Bungert 3ec022f54b
Merge pull request #1404 from dbungert/fix-wipe
filesystem: restore previous wipe behavior
2022-09-01 15:26:12 -06:00
Dan Bungert 9aec674904 filesystem: restore previous wipe behavior 2022-09-01 15:12:57 -06:00
Dan Bungert 24ec78c670
Merge pull request #1359 from blackboxsw/cloud-init/validate-user-data-schema
subiquitymodel: validate merged cloud-config userdata_raw before reboot
2022-09-01 13:48:14 -06:00
Chad Smith 069f0c76a7 subiquity.controllers.userdata: validate autoinstall.user-data schema
Raise SchemaValidationError when any autoinstall.user-data config
is invalid cloud-init cloud-config schema.

If any deprecated config keys or values are provided under
autoinstall.user-data, log warnings about those deprecations.
2022-09-01 13:12:53 -06:00
Chad Smith 1e0291e5df subiquitymodel: validate merged cloud-config userdata_raw before reboot
Raise SchemaValidationErrors when invalid config is provided to
cloud-init as merged cloud-config for the installed target.

Log warnings if any deprecated cloud-config keys are present in
merged cloud-config.
2022-09-01 13:12:53 -06:00
Chad Smith 07c62876d0 examples: fix invalid user-data example since we now validate schema 2022-09-01 13:12:53 -06:00
Dan Bungert cada41d7b9
Merge pull request #1396 from dbungert/no-double-jsonschema
snapcraft: remove dupe jsonschema
2022-09-01 12:37:22 -06:00
Dan Bungert 2929bb481b
Merge pull request #1386 from dbungert/lp-1983036-edit-part-wipe
filesystem: fix wipe on v2 edit_partition
2022-08-30 15:34:33 -06:00
Dan Bungert 96636fe3ff filesystem: fix add_partition wipe value 2022-08-30 12:47:55 -06:00
Dan Bungert 48d90d8b15 filesystem: fstype compare against orig fstype 2022-08-30 12:47:42 -06:00
Dan Bungert 02d2d44bae filesystem: edit require wipe on fstype change 2022-08-30 12:47:42 -06:00
Dan Bungert 590eb3a40c filesystem: edit_partition comment fixup 2022-08-30 12:47:42 -06:00
Dan Bungert aa0e6f34c7 filesystem: extend test for the unwipe case
Add test for the case where a user marks a partition with data as one to
be formatted, then later undoes that operation.
2022-08-30 12:47:42 -06:00
Dan Bungert 25f4ac0bc2 filesystem: fix wipe on v2 edit_partition 2022-08-30 12:47:42 -06:00
Dan Bungert 943ea53fbc
Merge pull request #1402 from dbungert/terminology
fix some easier cases of impolite language
2022-08-29 18:00:35 -06:00
Dan Bungert 1cbcbb7e3c
Merge pull request #1403 from dbungert/yaml-normalize
Yaml normalize
2022-08-29 17:35:23 -06:00
Michael Hudson-Doyle 60953951fe
Merge pull request #1394 from CarlosNihelton/style-help-gray
Defaults help text style to gray
2022-08-30 11:34:42 +12:00
Dan Bungert 80d6c7c09d snapcraft: normalize 2022-08-29 13:54:51 -06:00
Dan Bungert b9f75059be scripts: add yaml-normalize.py 2022-08-29 13:54:51 -06:00
Dan Bungert d73772258d fix some easier cases of impolite language 2022-08-29 12:30:39 -06:00
Carlos Nihelton 68b92f1022
Merge pull request #1400 from CarlosNihelton/optional-controller
Sets WslSetupOptions as an optional controller
2022-08-29 14:00:07 -03:00
Carlos Nihelton 6d51deedb6
Assign style if a str is passed
Otherwise assign self.help as passed.

Co-authored-by: Dan Bungert <danielbungert@gmail.com>
2022-08-29 13:55:07 -03:00
Carlos Nihelton c08ebef9df
Removes the controller name from the required set
INSTALL_MODEL_NAMES
2022-08-29 12:15:52 -03:00
Carlos Nihelton 86d19c6259
Sets WslSetupOptions as an optional controller
We have strong defaults, so the clients should only need to POST if
the desired options are not the default ones.
2022-08-29 12:15:29 -03:00
Dan Bungert 1bf562c85a
Merge pull request #1390 from CarlosNihelton/langpack-flag
[WSL] Enables users to skip installing language packs
2022-08-26 17:17:43 -06:00
Dan Bungert fe4946cc13
Merge pull request #1395 from blackboxsw/cloud-init/desktop-disable-cloud-init
cloudinit: disable cloud-init after final install completes
2022-08-26 17:17:07 -06:00
Carlos Nihelton bdefbd69aa
Clarifies the language tuple
With a comment showing one example situation
and changing the name 'native' to 'display_name'
2022-08-26 16:59:06 -03:00
Carlos Nihelton b5a69e33a6
Avoid using the '_' throwaway variable
by logging the language tuple directly.
2022-08-26 16:13:08 -03:00
Carlos Nihelton 23fbbf87ee
Documents the language tuple 2022-08-26 16:12:06 -03:00
Carlos Nihelton 69934729da
Removes forgotten log statement. 2022-08-26 16:09:02 -03:00
Carlos Nihelton 60c5127be0
Merge pull request #1399 from dbungert/runtests-trap-kill
runtests: use trap to ensure backgroun proc killed
2022-08-26 14:39:51 -03:00
Dan Bungert 58ab8c5e12 runtests: use trap to ensure backgroun proc killed 2022-08-26 10:52:05 -06:00
Dan Bungert 8bd0ea11ad
Merge pull request #1392 from ogayot/speed-up-integration-testing
integration: speed up check for listening interfaces in system_setup
2022-08-26 10:50:41 -06:00
Dan Bungert 5e776e3ae1
Merge pull request #1397 from dbungert/more-kname-fun
filesystem: fix kname for os prober
2022-08-26 08:10:49 -06:00
Dan Bungert 4ebaa6fc75
Merge pull request #1398 from jpnurmi/has-network-log
Log NetworkModel.has_network changes
2022-08-26 07:46:34 -06:00
J-P Nurmi 05ca22b320 Log NetworkModel.has_network changes 2022-08-26 15:06:15 +02:00