Commit Graph

4695 Commits

Author SHA1 Message Date
Dan Bungert 9829c14e6e probert: update for 'os' probe_type 2022-03-29 15:09:21 -06:00
Dan Bungert 3fb16487cf
Merge pull request #1246 from dbungert/faster-curtin-replay-tests
Faster curtin replay tests
2022-03-24 13:37:59 -06:00
Dan Bungert d4e755c0e9 command runner: prefer term allowlist 2022-03-24 11:53:15 -06:00
Dan Bungert 407d87d8bb command runner: allow SUBIQUITY_REPLAY_TIMESCALE
SUBIQUITY_REPLAY_TIMESCALE should be passed to replay-curtin-log.py,
which speeds up test_server_flow (11s -> 2s), and probably others.

For the unit test, by clearing the environment and using a known set,
we can avoid having to keep a second copy of the allow list in test.
2022-03-24 11:52:35 -06:00
Didier Roche 689a7fd5f1
Merge pull request #1244 from CarlosNihelton/deeng-199-fix-wsl-apt
Removes apt python library from system_setup
2022-03-23 06:59:51 +00:00
Carlos Nihelton ef18564eca
Cleans comments and adresses test.
- Under dry-run apt is run with --simulate.
- That can still fail if a package does not exist, for instance.
- If so, a file will not be written.
2022-03-22 19:41:37 -03:00
Carlos Nihelton c9f90dffb3
Fix stylistic flake8 warnings. 2022-03-22 18:04:37 -03:00
Carlos Nihelton f4a2b916a7
Removes dependency on apt python lib.
It seemed far too much complicated find the proper way to deal with
apt Python library under the snap environment.

Opted for running the system apt command without the LD_*
customisations, similar to what an installer does when chroot into the
taget system.
2022-03-22 17:50:54 -03:00
Carlos Nihelton a950d9e98f
Removes __recomended_language_packs() env argument
That function will not require a custom environment.
Also simplified snap_dir variable assignment.
2022-03-22 17:47:53 -03:00
Carlos Nihelton a36120e0bb
apply_locale() and create_user() accept custom env
This allows for running subprocess outside of the snap environment.
Both functions now receive a custom env without the LD_ related vars.
Renamed _create_user() to create_user() to make explicit that it has the
same semantic level as apply_locale().
2022-03-22 17:46:25 -03:00
Dan Bungert fd65eebd0a
Merge pull request #1237 from dbungert/lp-1948823
autoinstall: allow cloud source to override iso source
2022-03-21 12:19:14 -06:00
Olivier Gayot 8a56cfbc3b
Merge pull request #1239 from ogayot/fix-run-drivers
Fix command used in run-drivers mode
2022-03-21 19:01:57 +01:00
Dan Bungert 871c40ae92 autoinstall: raise Exception on bad arg 2022-03-21 11:51:33 -06:00
Dan Bungert 3cab357337
Merge pull request #1236 from dbungert/integration-tmpdir
integration: use output-base=$tmpdir
2022-03-21 11:46:45 -06:00
Olivier Gayot d400d90ee1 Fix command used in run-drivers mode
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-03-21 18:22:50 +01:00
Dan Bungert 845b7e42c7 integration: EXIT trap for consistent error msg
The trap on ERR doesn't trigger in all the cases that we want.
The EXIT trap seems to be more robust, albeit with the requirement to
actually check the result code.
2022-03-21 11:11:53 -06:00
Dan Bungert e59078c74e system-setup: inform server proc of output_base 2022-03-21 10:50:59 -06:00
Dan Bungert 96082252f7 integration: use output-base=$tmpdir
Move from using .subiquity as output-base to a tmpdir.  This solves
several practical problems, like accidentally running the tests while
dryrun is open in another terminal or any other case where the server
process that is connected to is not the one that is expected.

Also makes cleanup nicer.

On failure, it will show which temporary directory was used to allow for
easy log examination.
2022-03-21 10:50:59 -06:00
Dan Bungert 7afa2548a2 autoinstall: unit tests for file order 2022-03-18 16:40:09 -06:00
Dan Bungert 87b3a1354c autoinstall: specific order of possible locations
To allow customization where an install iso can have the autoinstall
data, and to ignore that in favor of autoinstall from cloud-config, this
implements a more specific order of loading from the possible locaitons.

Also, the chosen file is set aside, and then is top priority if the
subiquity process is reloaded.
2022-03-18 16:40:09 -06:00
Dan Bungert 80c3c7879c
Merge pull request #1234 from mwhudson/lp-1962205
never return a PROBING response from guided_POST
2022-03-18 09:17:32 -06:00
Michael Hudson-Doyle 4c59e1ee9b never return a PROBING response from guided_POST 2022-03-18 14:22:56 +13:00
Dan Bungert 84aee8e20e
Merge pull request #1230 from mwhudson/move-sizing-stuff
move partition size related stuff to its own module
2022-03-17 15:58:34 -06:00
Dan Bungert 3256172f0a
Merge pull request #1231 from mwhudson/fix-api-test
make test_v2_multi_disk_multi_boot api test more correct
2022-03-17 15:56:52 -06:00
Olivier Gayot ad6cd6e383
Merge pull request #1196 from ogayot/FR-2077
Add client-side controller and view to install third-party drivers on server installer
2022-03-17 10:38:48 +01:00
Olivier Gayot 2bf39f02ca Merge pull request #1217 from ogayot/ua-rebranding
Rename UbuntuAdvantage -> UbuntuPro
2022-03-17 09:20:43 +01:00
Michael Hudson-Doyle 4fdd4f9fec make test_v2_multi_disk_multi_boot api test more correct
This calls add_boot_partition on disks that are filled by pre-existing
partitions. That should not work, and does not in a branch I am working
on.
2022-03-17 13:35:01 +13:00
Michael Hudson-Doyle f62a4ca187 move partition size related stuff to its own module
This avoids a circular import in another branch I am working on.
2022-03-17 13:32:35 +13:00
Dan Bungert d7d1a70b59
Merge pull request #1229 from dbungert/api-test-flow
api test: fix flow test for v2 storage actions
2022-03-16 15:41:43 -06:00
Dan Bungert 6a378de508 api test: fix flow test for v2 storage actions 2022-03-16 15:21:39 -06:00
Michael Hudson-Doyle 0550626482
Merge pull request #1222 from mwhudson/optional-v2-storage
Optional v2 storage
2022-03-17 09:49:01 +13:00
Dan Bungert cad6cca8e1
Merge pull request #1226 from canonical/deeng-184-systemd-experimental
Systemd experimental support
2022-03-16 13:16:31 -06:00
Didier Roche 09c7210406 System-Setup: fix typos
Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
2022-03-16 12:24:46 +01:00
Didier Roche 208d8778c9 System-Setup: Clean up load data API
We don’t need to pass an empty dict as parameter.

Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
2022-03-16 12:24:46 +01:00
Didier Roche d17cd6fc38 System-Setup: Add systemd experimental support to WSL
Grow a new API for enabling/disabling systemd experimental support. We
do this by chaining a specific command= in the boot section.
We preserve the user customized command= content when systemd
experimental support is not enabled.

Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
2022-03-16 12:24:18 +01:00
Michael Hudson-Doyle 7e12213e8c use a smarter parts_and_gaps implemenation for v2 config 2022-03-16 22:00:17 +13:00
Michael Hudson-Doyle f5dad435ed send storage_version to client 2022-03-16 20:52:58 +13:00
Michael Hudson-Doyle 4c33463b9e add --storage-version command line flag
It is just copied into the output storage config so far
2022-03-16 20:52:55 +13:00
Michael Hudson-Doyle 303f78fb6d
Merge pull request #1224 from dbungert/probert-py310
probert: update for python 3.10 fix (lp-1964571)
2022-03-16 12:37:22 +13:00
Dan Bungert bed7cffe3c
Merge pull request #1164 from maces/patch-1
fixing swap path + support partition size units
2022-03-15 15:38:31 -06:00
Dan Bungert 4379f1b8d4 probert: update for python 3.10 fix (lp-1964571) 2022-03-15 15:15:53 -06:00
Dan Bungert 54d75feaa5
Merge pull request #1223 from canonical/deeng-188-remove-ubuntu-wsl-integration
system-setup: Remove ubuntu-wsl-integration from API and TUI.
2022-03-15 12:59:48 -06:00
Olivier Gayot e9b2e24b1a Rename UbuntuAdvantage -> UbuntuPro but keep autoinstall compat
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-03-15 11:50:57 +01:00
Olivier Gayot cf17de1687 Implement backward compatibility mechanism for autoinstall key
In addition to autoinstall_key, controllers can now define an
autoinstall_key_alias.

The purpose of this attribute is to provide a backward compatibility
mechanism when we need to change the name of an autoinstall_key for
whatever reason.

When loading autoinstall data, if we can't find data matching the
autoinstall_key, we will now also look for data matching the key alias.

In the JSON schema, the old name (i.e., autoinstall_key_alias) will be
marked deprecated and the description will have the name of the
replacement key (i.e., autoinstall_key).

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-03-15 11:44:21 +01:00
Heinrich Schuchardt 4d68159e69
Merge pull request #1221 from xypron/curtin
curtin: Add riscv64 to supported UEFI architectures
2022-03-15 09:35:59 +01:00
Heinrich Schuchardt f9ce537053 curtin: Add riscv64 to supported UEFI architectures
synchronize with https://git.launchpad.net/curtin

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-03-15 09:13:32 +01:00
Dan Bungert 7fc30e8823
Merge pull request #1218 from dbungert/console-conf-await-str
console-conf: fix crash on network info
2022-03-14 15:20:40 -06:00
Dan Bungert 4b1277ae2d console-conf: fix crash on network info
If you run dryrun for console-conf, go to the network page, go to an
interface, then info, a crash of the form
TypeError: object str can't be used in 'await' expression
can be seen. The signature for the core version of get_info_for_netdev
is not async, but a non-async method returning str.

So mark the core version of the function async.

Co-authored-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
2022-03-14 15:09:23 -06:00
Dan Bungert 6f89bcb64c
Merge pull request #1213 from dbungert/offset-in-gap
filesystem: show offset in gap & partition
2022-03-14 14:57:01 -06:00
Dan Bungert 7638b4b45c apitest: document failing test
Allowing the boot partition to be implicitly created results in it being
physically second on disk.
2022-03-14 14:30:05 -06:00