Commit Graph

5761 Commits

Author SHA1 Message Date
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
Dan Bungert f24c76bc50
Merge pull request #1590 from dbungert/block-probing-timeouts
storage: lengthen and log probing time
2023-03-08 12:35:31 -07:00
Dan Bungert 79c38b086d
Merge pull request #1589 from dbungert/lp-2009151-manual-part-add-boot
storage/v2: endpoint for boot-plausible disks
2023-03-07 22:24:36 -07:00
Dan Bungert 9d78aed696 storage: lengthen and log probing time
A reasonably common type of bug report is hitting the block probing
timeout.  That timeout is at 15 seconds today.  Extend that to 90
seconds, and log the time it takes.

As a performance exercise, it would be good to know where that time is
being spent and why it takes 10x longer or more for some people.
2023-03-07 19:10:15 -07:00
Dan Bungert 8524f657b4 storage: s/get_guided_disks/potential_boot_disks/
This routine only answers the bootable question, it doesn't consider
other guided-required criteria such as sizing.
2023-03-07 16:07:57 -07:00
Dan Bungert 10e22a96d7 storage/v2: endpoint for boot-plausible disks 2023-03-07 15:41:47 -07:00
Carlos Nihelton 65e100eed9
Merge pull request #1581 from CarlosNihelton/ad-autoinstall-deeng-587
Active Directory - Partial autoinstall support #&1F979
2023-03-07 12:40:46 -03:00
Carlos Nihelton 3565027e02
Moves the AD autoinstall test to the API testing
Test looks much simpler now.
One small addition in the Server testing class needed to expose the
output_base dir so we can inspect the logs.
2023-03-07 08:37:38 -03:00
Dan Bungert cfeb3fe163
Merge pull request #1584 from ogayot/mirror-testing-apt-warning
apt: force downloads to be unsandboxed when running mirror testing
2023-03-06 12:00:11 -07:00
Carlos Nihelton 82cb7bd33e
Merge pull request #1585 from CarlosNihelton/ad-split-domain-check
Active Directory - Split the domain validation endpoint in two
2023-03-06 09:00:56 -03:00
Carlos Nihelton 2625c233b0
Updates the integration to set variant and update AD
I couldn't find a way to set the variant as desktop in the autoinstall
file or command line.
Thus some shell scripting hackery runs curl to set the variant.
Also, GET /active_directory must provide user and domain, thus updating
the password and curl'ing again configures the AD controller.
2023-03-05 15:03:43 -03:00
Carlos Nihelton eb08609238
Updates the autoinstall-ad example file to '-' 2023-03-03 20:21:39 -03:00
Dan Bungert 86e7fbbc22
Merge pull request #1579 from acres-com-au/add-autoinstall-luks
Support LUKS with 'lvm' autoinstall storage layout
2023-03-03 13:58:46 -07:00
Olivier Gayot 2d37baa0b6
Merge pull request #1575 from ogayot/retry-downloads
when installing packages, try the download operation up-to 3 times
2023-03-03 20:48:19 +01:00