Michael Hudson-Doyle
41664eeec3
move apt configuration to its own file
2021-11-10 09:21:34 +13:00
Michael Hudson-Doyle
b951216920
implement the bulk of subiquity-configure-apt in the server process
...
This uses a kind of crazy approach where the hook script we get curtin
to run makes an API call to the server process to do the actual
configuration. I can't work out if this is genius or insane or both but
anyway it is only a step on to the way to doing the apt configuration
before we start curtin so it won't be around for long.
2021-11-10 09:21:34 +13:00
Michael Hudson-Doyle
71b1261731
Merge pull request #1118 from mwhudson/move-command_runner
...
refactor curtin invocation some more
2021-11-10 09:21:09 +13:00
Carlos Nihelton
e88eb7334f
Avoiding grep
2021-11-09 09:42:57 -03:00
Carlos Nihelton
4e050ecddb
Style improvements.
2021-11-09 09:36:10 -03:00
Dan Bungert
6542f8629f
Merge pull request #1120 from mwhudson/kvm-test-tweaks
...
kvm-test: assorted updates
2021-11-08 16:55:52 -07:00
Dan Bungert
e31a3c31ac
kvm-test: fix slimy invocation
...
We can't delete the snap file created by quick-test because we don't
have the path to it. The with statement makes no sense.
2021-11-08 16:44:35 -07:00
Carlos Nihelton
8f4a6927bb
Enables preserving existing container instances.
...
- Useful for develop env.
- Mimics the CI while avoiding downloading images all the time.
- Instance names change from 'tester' to the Ubuntu release adjective.
- lxc will only download if there is no local instance with that name.
- Useful for preserving matrix build instances.
2021-11-08 19:20:44 -03:00
Carlos Nihelton
f9d3877feb
Corrected list type hint for Python 3.8.
...
- CI failed on Focal due Python version unable to understand list[str].
2021-11-08 19:03:10 -03:00
Carlos Nihelton
eb6bd2d263
Smaller functions, early returns and funny mocking
2021-11-08 13:11:30 -03:00
Carlos Nihelton
6be4aea138
l-s-c as dep on Makefile, avoid raising exceptions
...
- And clear .subiquity/var/cache
2021-11-05 18:09:15 -03:00
Carlos Nihelton
5f9f2122ce
System locale manipulation wired into Subiquity.
...
- We don't have cloud-init in WSL.
- Subiquity must perform any actions to support the choosen locale.
- l-s-c package added as dependency.
2021-11-05 17:29:33 -03:00
Michael Hudson-Doyle
ce94726a43
kvm-test: do not boot via -kernel/-initrd unless needed
2021-11-05 16:05:22 +13:00
Michael Hudson-Doyle
b6e4181fe7
kvm-test: fix a typo
2021-11-05 16:05:00 +13:00
Michael Hudson-Doyle
c3727ac506
kvm-test: fix assumption around snap name quick-test-this-branch.sh creates
2021-11-05 16:04:51 +13:00
Michael Hudson-Doyle
8b7662b0a3
kvm-test: add a --snap argument to inject a specific snap
2021-11-05 16:04:18 +13:00
Michael Hudson-Doyle
277e1fe173
kvm-test: add a --basenap argument
...
this is like --quick but updates a passed snap rather than the one
already in the iso
2021-11-05 16:03:41 +13:00
Michael Hudson-Doyle
85f0c62ae4
change curtin runner api to be more one-shot
2021-11-05 14:59:18 +13:00
Michael Hudson-Doyle
9442c4ad07
make CurtinCommandRunner a bit more self-contained
2021-11-05 14:14:57 +13:00
Michael Hudson-Doyle
66f520e743
move CurtinCommandRunner to its own file
2021-11-05 14:14:57 +13:00
Michael Hudson-Doyle
0c89518bb3
attach CommandRunner to application
2021-11-05 14:14:57 +13:00
Michael Hudson-Doyle
ba7892e91c
move CommandRunner to its own file
2021-11-05 14:14:57 +13:00
Dan Bungert
386e19b0ea
Merge pull request #1119 from dbungert/kvm-test-nov-2021
...
scripts: add kvm-test
2021-11-04 17:39:02 -06:00
Dan Bungert
a67b9d18dc
scripts: add kvm-test
...
Updated version of the kvm-test script shown previously.
2021-11-04 17:32:52 -06:00
Michael Hudson-Doyle
2840ba4bda
Merge pull request #1117 from dbungert/api-less-flaky
...
test/api: make less flaky
2021-11-05 07:56:13 +13:00
Dan Bungert
eb29fa6df4
test/api: make less flaky
...
This is part of a changeset intended to have the API tests run in
parallel. I don't consider this ideal - I still see failures when
running tests in parallel - but am providing it now with the intent of
helping people who are seeing api test flakiness even when those tests
are run serially.
* check for socket existence on startup
* lengthen timeouts on shutdown
2021-11-04 10:30:39 -06:00
Carlos Nihelton
a264fdafbc
Prefill was not working outside of dry-run
2021-11-04 12:01:00 -03:00
Michael Hudson-Doyle
d8f3fe48c4
Merge pull request #1108 from mwhudson/command-runner
...
create helper classes for running install commands
2021-11-04 16:08:07 +13:00
Carlos Nihelton
887d63caf0
System locale manipulation wired into Subiquity.
...
- We don't have cloud-init in WSL.
- Subiquity must perform any actions to support the choosen locale.
2021-11-03 18:22:42 -03:00
Dan Bungert
46dfba39c7
Merge pull request #1114 from CarlosNihelton/fix_ci_dash_R
...
Temporary fix for integration tests chroot'ing
2021-11-03 12:59:52 -06:00
Carlos Nihelton
106b8c758e
Temporary fix for integration tests chroot'ing
...
useradd -R does chroot.
useradd -P doesn't.
2021-11-03 15:53:02 -03:00
Didier Roche
3d2be8f66f
Merge pull request #1113 from canonical/fix_server_state_rerun
...
Fix reruning in production system_setup on WSL
2021-11-03 12:54:06 +01:00
Didier Roche
9ba7e8525d
Merge pull request #1112 from canonical/system_setup_run_async
...
Don’t block on running commands in configure
2021-11-03 12:53:52 +01:00
Didier Roche
244aa7de81
Fix reruning in production system_setup on WSL
...
On system_setup, we always run the subiquity server. On WSL, ensure we
wipe the server-state file (no systemd fallback) before starting the
server.
Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
2021-11-03 12:48:53 +01:00
Didier Roche
277fe55599
Don’t block on running commands in configure
...
Those commands needs to be async to be able to still answer GET/POST
request while configure is running.
This allows showing up the summary page immediately.
Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
2021-11-03 12:35:25 +01:00
Didier Roche
c757adce45
Merge pull request #1110 from canonical/fix_system_setup_summary_hanging
...
Summary page to show immediately and update once the setup is done
2021-11-03 11:01:27 +01:00
Didier Roche
c74f0d464f
Merge pull request #1109 from canonical/optional_progress
...
Make progress controller optional.
2021-11-03 10:51:42 +01:00
Didier Roche
f8e90c894d
Summary page to show immediately and update once the setup is done
...
Shows immediately the summary page. Before, this one was making a GET
request to the server, which was stuck on any long running command in
the controller.
Now, affect correctly the identity in memory and reuse it if needed.
Show a progress message while the configuration is happening and replace
it with a "completed" text on success.
Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
2021-11-03 10:48:03 +01:00
Didier Roche
365922eb35
Merge pull request #1111 from canonical/misc_fixes_for_ci
...
system_setup: Many fixes for ci
2021-11-03 10:42:39 +01:00
Didier Roche
fa5721ce0a
Allow waiting on summary page
...
We previously only went on this page when DONE or in ERROR state. Allow
now to be in any state as we switch to it as soon as possible.
Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
2021-11-03 10:33:38 +01:00
Didier Roche
f762f41a5b
Don’t override syslog dir to prevent printing on TUI.
...
Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
2021-11-03 10:32:57 +01:00
Didier Roche
7cd65267e9
Fix server socket path in dry-run mode
...
Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
2021-11-03 10:32:11 +01:00
Didier Roche
bbd0121321
Make progress controller optional.
...
The progress controller was already optional in
subiquity/server/controllers/cmdlist.py. However, there was one missing
place in show_progress(). Use a similar getattr strategy.
2021-11-03 10:20:58 +01:00
Michael Hudson-Doyle
4fa0e22b58
create a helper class for invoking curtin
2021-11-03 15:28:26 +13:00
Michael Hudson-Doyle
b8719acc0d
add a class to run install commands
...
Makes not running things in dry-run mode that much cleaner.
2021-11-03 15:28:23 +13:00
Didier Roche
a4454c9153
Merge pull request #1106 from dbungert/workflows-jammy
...
workflows: +jammy
2021-11-02 15:57:01 +01:00
Dan Bungert
4c94430aab
Merge pull request #813 from Forst/merge-config
...
Add support for merging lists when merging user-data
2021-11-01 13:35:52 -06:00
Dan Bungert
88f88350cb
Merge pull request #1105 from CarlosNihelton/ft-prefill-deeng-85
...
Make subiquity server supporting prefill install files (for WSL System Setup)
2021-11-01 13:35:13 -06:00
Carlos Nihelton
1a0c3a1ef0
Prefill file checks summarized by os.path.isfile.
2021-11-01 16:20:24 -03:00
Carlos Nihelton
af91bb0a6f
Removing dead code.
...
- My bad.
2021-10-29 20:23:16 -03:00