Commit Graph

6037 Commits

Author SHA1 Message Date
Dan Bungert 2bfff57f41 network: run `netplan apply` without snap env
netplan isn't staged in the snap, and the environment variables being
passed around don't help it.
2023-03-29 13:23:57 -06:00
Chad Smith df57846dfb cloud-init: preserve ephemeral cloud-init logs in target to aid in debug 2023-03-28 20:27:18 -06:00
Dan Bungert bc33062e9b
Merge pull request #1620 from jpnurmi/desktop-sources
Add test source catalog for desktop variants
2023-03-28 12:39:58 -06:00
J-P Nurmi 2cbf8fc0dc Add test source catalog for desktop variants 2023-03-28 20:15:14 +02:00
Carlos Nihelton d00171b7f4
Merge pull request #1618 from CarlosNihelton/fix-joining-live
(fix) Join target instead of live session
2023-03-28 14:47:51 -03:00
Carlos Nihelton cd6e69187a
(fix) Join target instead of live session
LP: #2013079
Found during beta testing that the live session is joining, instead of
the target.
2023-03-28 10:00:59 -03:00
Olivier Gayot aac8eb43c6
Merge pull request #1616 from ogayot/raid1-path-fix
filesystem: fix path property from Raid - override attribute
2023-03-27 11:57:06 +02:00
Michael Hudson-Doyle 130809f366
Merge pull request #1615 from mwhudson/defer-system-setting
only examine system from snapd when source is selected
2023-03-27 14:58:45 +13:00
Carlos Nihelton 1105da2368
Falls back to seeded l-s-c
UDI snap ships the package, thus its data dir is part of the snap
subiquity snap does not.
This tries l-s-c data dir in the base system, outside of the snap
and gives up if the dir does not exits.
2023-03-24 11:54:44 -03:00
Olivier Gayot 6737e2c053 filesystem: fix path property from Raid - override attribute
The following commmit:
  ce146ab28 add .path to Raid so for_client(raid-with-partitions) works

introduced a (read only) path property for Raid objects, returning an
imaginary value to make for_client work with Raid objects. Later on, the
following commit:
  8e658998e add "path" attributes to fs model objects that curtin now
            provides a path for

introduced a (read/write) path attribute to all filesystem objects. For
Raid however, the property still takes precedence over the new attribute
of the same name, so doing raid.path = x is invalid (no setter) and
results in the following exception:

AttributeError: can't set attribute 'path'

Fixed by using a @property + @setter attribute for path. The getter
returns the actual path if it exists, otherwise returns the same
imaginary value as before.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-03-24 14:42:54 +01:00
Michael Hudson-Doyle c728dfbc05 only examine system from snapd when source is selected
and only take actions (like setting storage_version to 2) when we know
we are installing a core boot classic system.
2023-03-24 17:38:07 +13:00
Michael Hudson-Doyle 4496f22ff8
Merge pull request #1613 from mwhudson/async-guided
make FilesystemController.guided_core_boot async and fallout
2023-03-24 17:37:50 +13:00
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