Commit Graph

5824 Commits

Author SHA1 Message Date
Michael Hudson-Doyle 0756701118 make FilesystemController.guided_core_boot async and fallout
Will need this in a follow on branch.
2023-03-24 16:51:01 +13:00
Michael Hudson-Doyle ccc5d37945
Merge pull request #1609 from mwhudson/ephemeral-source-handlers
create source handlers and apt configurers more on-demand
2023-03-24 15:38:05 +13:00
Michael Hudson-Doyle 067d1be4ed address review comments 2023-03-24 14:08:21 +13:00
Michael Hudson-Doyle 42a7529fb6 use separate AptConfigurers for testing and final config 2023-03-23 17:27:17 +13:00
Michael Hudson-Doyle 5bf552f28b create curtin source handlers in a more on-demand fashion
When we start supporting source variations we are going to need to set
these up and tear them down a lot more often, trying to keep just one as
app.controllers.Source._handler is going to get difficult. I actually
think this is cleaner overall (at least until we get to downloading
installation sources from the internet...).
2023-03-23 17:27:15 +13:00
Michael Hudson-Doyle e91f5c00bb
Merge pull request #1604 from mwhudson/capabilities-v1
use capabilities on the v1 api
2023-03-23 17:25:15 +13:00
Michael Hudson-Doyle 90200d5a00
Merge pull request #1611 from mwhudson/proposed-lint
fix "make lint" when run with the new pycodestyle/flake8
2023-03-23 17:24:38 +13:00
Michael Hudson-Doyle 4d35f1e94d
Merge pull request #1612 from mwhudson/non-zero-DISPLAY
DISPLAY is not :0 for me today
2023-03-23 17:23:59 +13:00
Michael Hudson-Doyle a9c6922a9e move snapd enums back to snapdapi now they are no longer part of the subiquity API 2023-03-23 17:10:10 +13:00
Michael Hudson-Doyle 26f3a24512 use capabilities on the v1 api
This mostly affects the core boot classic stuff.
2023-03-23 17:10:10 +13:00
Michael Hudson-Doyle 0486128304 add core boot options to GuidedCapability and use them for v2 api 2023-03-23 17:10:10 +13:00
Michael Hudson-Doyle 70fcf15b5e DISPLAY is not :0 for me today 2023-03-23 16:52:55 +13:00
Michael Hudson-Doyle c0438b44ca fix "make lint" when run with the new pycodestyle/flake8 2023-03-23 16:38:35 +13:00
Michael Hudson-Doyle fb3361918e
Merge pull request #1610 from canonical/canary-23.04
move from use_lvm flag on guided fs things to more generic capabilities
2023-03-23 15:24:43 +13:00
Michael Hudson-Doyle 43ae143e17 move from use_lvm flag on guided fs things to more generic capabilities 2023-03-23 14:25:23 +13:00
Dan Bungert cf9946a45d
Merge pull request #1608 from dbungert/lint
workflow: run both linters always
2023-03-21 19:24:50 -06:00
Dan Bungert a7ecf9c8ee workflow: run both linters always
If the linter is broken in the distro in the devel series but not the
LTS, such as right now, it's interesting to allow the LTS linter to
finish.
2023-03-21 18:44:51 -06:00
Dan Bungert bb625037b3
Merge pull request #1606 from dbungert/ai-active-directory-hang
ad: add hack to fix non-autoinstall cases
2023-03-21 18:38:04 -06:00
Dan Bungert c07d32b3f1 ad: add hack to fix non-autoinstall cases 2023-03-21 17:32:00 -06:00
Michael Hudson-Doyle 903299fb84
Merge pull request #1605 from mwhudson/explicit-install-media
do not let size: largest in storage autoinstall config match the inst…
2023-03-22 12:03:15 +13:00
Carlos Nihelton 71e30e1c3d
Merge pull request #1602 from CarlosNihelton/fix-missing-script
[system_setup] Fix missing script in snap.
2023-03-21 08:49:18 -03:00
Olivier Gayot cf41415f7f
Merge pull request #1601 from ogayot/wlan-not-available
network: fix check of wlan network state
2023-03-21 09:07:38 +01:00
Michael Hudson-Doyle f585505069 do not let size: largest in storage autoinstall config match the install media 2023-03-21 16:55:43 +13:00
Dan Bungert f5f0cb5a51
Merge pull request #1603 from dbungert/errcontroller
api: additional checks for controllers running
2023-03-20 19:56:15 -06:00
Dan Bungert ec2255b2e2 api: additional checks for controllers running 2023-03-20 19:28:59 -06:00
Carlos Nihelton e0632609d5
Fix missing scrip in snap. 2023-03-20 13:42:50 -03:00
Olivier Gayot 07db52efc8 network: fix check of wlan network state
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-03-20 09:33:16 +01:00
Olivier Gayot 2fc55b4363
Merge pull request #1586 from ogayot/done-function-or-button
filesystem: rename done btn which overrides a meth. of the same name
2023-03-17 17:21:09 +01:00
Dan Bungert 4cd2c4eb58
Merge pull request #1598 from dbungert/lunar-2023-03-17
Lunar 2023 03 17
2023-03-17 09:12:00 -06:00
Olivier Gayot 57c132729f snapcraft: upgrade to core22
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-03-17 08:42:37 -06:00
Dan Bungert 22c3987db5 api: delay most endpoints until controllers start
In LP: 2009797, an exception of this form happens:
AttributeError: 'FilesystemController' object has no attribute '_start_task'

The installer client, u-d-i, is asking for storage information ASAP
after the socket starts listening, and in this case that happened before
all controllers were started.  The sync primitive the probe is waiting
on wasn't created yet.

With one known exception, /meta/status, we really shouldn't be
responding to random API calls, and the startup sequence of the
controllers should be relatively quick (sub 1 second to be sure).
Just delay them, except for the special one.
2023-03-17 08:42:04 -06:00
Dan Bungert a960f2bbfa storage: use SingleInstanceTask improvements 2023-03-17 08:39:01 -06:00
Dan Bungert f7cb06f72a async_helpers: simplify task done check
Another version of the task-created-yet problem is the non-blocking
check to see if it is done or not.  Add a wrapper here to simplify
calling code.
2023-03-17 08:39:01 -06:00
Dan Bungert 71b71425d3 async_helpers: make SingleInstanceTask.wait safer
SingleInstanceTask has distinct steps for creation of the object, and
starting the task.  If a different coroutine is waiting on the
SingleInstanceTask, it isn't safe to directly call
SingleInstanceTask.wait() as the task may or may not have been created
yet.

Existing code usage of SingleInstanceTask is in 4 categories, with
reguards to SingleInstanceTask.wait():
1) using SingleInstanceTask without using SingleInstanceTask.wait().
   This is unchanged.
2) using SingleInstanceTask.wait without a check on task is not None.
   This may be safe now, but is fragile in the face of innocent-looking
   refactors around the SingleInstanceTask.
3) using SingleInstanceTask.wait after confirming that the task is not
   None.  This is fine but a leaky abstraction.
4) directly waiting on the SingleInstanceTask.task.  Another leaky
   abstraction, but it's solving a cancellation problem.  Leaving this
   alone.

By enhancing SingleInstanceTask.wait(), cases 2 and 3 are improved.  The
code not checking the task today is made safer, and the code checking
the task today can be simplified.
2023-03-17 08:39:01 -06:00
Dan Bungert 0b3f84f7cd make: timeout on unit tests
We aren't close to hitting this timeout in unit tests that I can see,
but some of the asyncio tests I'm writing for now risk a hang and I
don't want to get CI stuck.
2023-03-17 08:39:01 -06:00
Dan Bungert 8db8cbba09 docs: update expectations for password 2023-03-17 08:35:03 -06:00
Olivier Gayot 5680c6f2ec
Merge pull request #1597 from ogayot/core22-userbase
snapcraft: upgrade to core22
2023-03-17 09:15:23 +01:00
Dan Bungert 7c4d3328c5
Merge pull request #1596 from dbungert/lp-2009797-start-task-v2
api: delay most endpoints until controllers start
2023-03-16 14:53:42 -06:00
Dan Bungert c6530c16b3 api: delay most endpoints until controllers start
In LP: 2009797, an exception of this form happens:
AttributeError: 'FilesystemController' object has no attribute '_start_task'

The installer client, u-d-i, is asking for storage information ASAP
after the socket starts listening, and in this case that happened before
all controllers were started.  The sync primitive the probe is waiting
on wasn't created yet.

With one known exception, /meta/status, we really shouldn't be
responding to random API calls, and the startup sequence of the
controllers should be relatively quick (sub 1 second to be sure).
Just delay them, except for the special one.
2023-03-16 12:53:55 -06:00
Olivier Gayot 9b18f45700 snapcraft: upgrade to core22
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-03-16 12:21:44 +01:00
Michael Hudson-Doyle 18346e3f74
Merge pull request #1591 from mwhudson/install-same-disk
allow autoinstalls to use the disk the installer booted from
2023-03-15 15:16:39 +13:00
Dan Bungert 71a5788c43
Merge pull request #1593 from dbungert/SingleInstanceTask-wait
Single instance task wait
2023-03-13 19:59:32 -06:00
Dan Bungert 0a7d4a82a7 storage: use SingleInstanceTask improvements 2023-03-13 15:50:33 -06:00
Dan Bungert 98a2ff8647 async_helpers: simplify task done check
Another version of the task-created-yet problem is the non-blocking
check to see if it is done or not.  Add a wrapper here to simplify
calling code.
2023-03-13 15:50:33 -06:00
Dan Bungert 075b06ce70 async_helpers: make SingleInstanceTask.wait safer
SingleInstanceTask has distinct steps for creation of the object, and
starting the task.  If a different coroutine is waiting on the
SingleInstanceTask, it isn't safe to directly call
SingleInstanceTask.wait() as the task may or may not have been created
yet.

Existing code usage of SingleInstanceTask is in 4 categories, with
reguards to SingleInstanceTask.wait():
1) using SingleInstanceTask without using SingleInstanceTask.wait().
   This is unchanged.
2) using SingleInstanceTask.wait without a check on task is not None.
   This may be safe now, but is fragile in the face of innocent-looking
   refactors around the SingleInstanceTask.
3) using SingleInstanceTask.wait after confirming that the task is not
   None.  This is fine but a leaky abstraction.
4) directly waiting on the SingleInstanceTask.task.  Another leaky
   abstraction, but it's solving a cancellation problem.  Leaving this
   alone.

By enhancing SingleInstanceTask.wait(), cases 2 and 3 are improved.  The
code not checking the task today is made safer, and the code checking
the task today can be simplified.
2023-03-13 15:50:33 -06:00
Dan Bungert 88a1fbd4ba make: timeout on unit tests
We aren't close to hitting this timeout in unit tests that I can see,
but some of the asyncio tests I'm writing for now risk a hang and I
don't want to get CI stuck.
2023-03-10 15:59:17 -07:00
Dan Bungert 91fe266b34
Merge pull request #1592 from dbungert/ref-password
docs: update expectations for password
2023-03-10 08:20:50 -07:00
Dan Bungert fcf329e172 docs: update expectations for password 2023-03-10 07:58:37 -07:00
Michael Hudson-Doyle a95530ab14 oops 2023-03-10 14:35:55 +13:00
Michael Hudson-Doyle 7902233d8a hide the install media differently 2023-03-09 23:18:27 +13:00