Commit Graph

5575 Commits

Author SHA1 Message Date
Michael Hudson-Doyle 5baa7b5e5f tidy sample data slightly 2022-11-10 11:47:29 +13:00
Michael Hudson-Doyle 8869c0edc1
Merge pull request #1477 from mwhudson/tpm-mount-system
bind mount systems from before asking snapd about them
2022-11-10 11:47:00 +13:00
Michael Hudson-Doyle 690f23acf9 add ?wait=true to serverish api test
POSTing to /source now triggers some asynchronous activity
2022-11-09 09:46:47 +13:00
Michael Hudson-Doyle 632e099e1a
Merge pull request #1473 from ogayot/codecs
codecs: add ability to install ubuntu-restricted-addons
2022-11-09 08:51:27 +13:00
Michael Hudson-Doyle 8b9a16c198 bind mount systems from before asking snapd about them
For the systems currently being tested, the live installer environment
is stacked on the one being installed and so the system definition for
the system being installed is already available. That's not going to be
true in full generality though, so add some helpers to make all systems
defined in the source available in the live installer environment before
calling into snapd to find out about them.
2022-11-08 14:48:35 +13:00
Michael Hudson-Doyle a372c3edab
Merge pull request #1475 from mwhudson/asyncio.create_task
switch from loop.create_task to asyncio.create_task
2022-11-08 11:06:18 +13:00
Michael Hudson-Doyle c03b23d7e4
Merge pull request #1470 from mwhudson/tpm-partitioning
do partitioning based on information from gadget
2022-11-08 10:26:59 +13:00
Michael Hudson-Doyle 82f2c78989 improvements suggested in review 2022-11-08 10:13:47 +13:00
Michael Hudson-Doyle 85b3cd0724 switch from loop.create_task to asyncio.create_task
mostly done with sed
2022-11-08 10:08:46 +13:00
Michael Hudson-Doyle 448512e31c only offer disks the gadget will fit on 2022-11-04 12:04:42 +01:00
Michael Hudson-Doyle cf80463e5b do partitioning based on information from gadget 2022-11-04 11:57:17 +01:00
Michael Hudson-Doyle 796f442445 generalize the handling of core boot classic systems we do not / cannot support 2022-11-04 11:56:33 +01:00
Olivier Gayot c46723750b codecs: add ability to install ubuntu-restricted-addons
Subiquity now supports a new endpoint that can be used by the desktop
installer to configure whether the ubuntu-restricted-addons package
should be installed. This package contains third-party codecs commonly
used on a desktop install.

  curl --unix-socket /run/subiquity/socket http://a/codecs
  > {"install": false}

  curl --unix-socket /run/subiquity/socket \
    http://a/codecs -d '{"install": true}'

  curl --unix-socket /run/subiquity/socket http://a/codecs
  > {"install": true}

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-11-04 10:41:03 +01:00
Dan Bungert 66a55ad39b
Merge pull request #1472 from dbungert/poweroff
doc: fix shutdown
2022-11-03 07:28:04 -06:00
Dan Bungert b62b9444b7 doc: fix shutdown 2022-11-03 14:04:26 -06:00
Ken VanDine bdc05ae0e0 Updated tests 2022-11-03 08:35:21 +01:00
Ken VanDine 4f8248965b Ensure first user is in the users group and not in the lxd group. This
is necessary for new installs to support unprivileged lxd
2022-11-03 08:22:43 +01:00
Michael Hudson-Doyle 1294365291
Merge pull request #1468 from mwhudson/part-names-and-fs-labels
support setting filesystem label and partition name
2022-11-02 22:02:39 +13:00
Michael Hudson-Doyle 92401a8fd7
Merge pull request #1469 from mwhudson/async-snapd-error
notice errors when an async snapd operation fails
2022-11-02 21:43:17 +13:00
Olivier Gayot d41c3b9ec0
Merge pull request #1445 from ogayot/LP1991413-LP1991929
Multiple fixes for size: -1 partitions
2022-11-02 09:39:30 +01:00
Michael Hudson-Doyle b79f5727bb
fix default for label
Co-authored-by: Dan Bungert <danielbungert@gmail.com>
2022-11-02 21:38:34 +13:00
Michael Hudson-Doyle 20513cc14a
Merge pull request #1462 from mwhudson/tpm-ui
Start of UI for TPM-backed FDE
2022-11-02 04:06:59 +13:00
Michael Hudson-Doyle 27953f794d fix integration test 2022-11-01 15:59:06 +01:00
Michael Hudson-Doyle f87b97bbdf add some more sample data 2022-11-01 14:39:23 +01:00
Michael Hudson-Doyle 2e05f79dc1 add example source, api output and fix some bugs 2022-11-01 13:54:36 +01:00
Michael Hudson-Doyle 405fb1895e wall of text -> dictionary 2022-11-01 13:54:36 +01:00
Michael Hudson-Doyle 24fdce6e72 implement an error screen for defective encryption 2022-11-01 13:54:36 +01:00
Michael Hudson-Doyle f7ba692704 modify guided UI for core boot classic system
In particular, only allow the selection of a disk in this case and allow
choice of whether to use TPM backed FDE according to data from snapd.
2022-11-01 13:54:36 +01:00
Michael Hudson-Doyle 952811fa14 pass encryption information to subiquity client
and skip storage editing screen if it is present.
2022-11-01 13:54:36 +01:00
Michael Hudson-Doyle 1ef6267b54 allow a source to define a snapd_system_label
And fetch information about it from snapd when it is selected.
2022-11-01 13:54:36 +01:00
Michael Hudson-Doyle c8068d7dab api and type definitions for talking to snapd systems api
Some of these types are going to end up being part of the subiquity API
so they get defined in subiquity.common.types
2022-11-01 13:54:31 +01:00
Michael Hudson-Doyle 6e64c6b8b5 notice errors when an async snapd operation fails 2022-11-01 13:32:35 +01:00
Michael Hudson-Doyle cf808ffa2a support setting filesystem label and partition name 2022-11-01 11:42:33 +01:00
Olivier Gayot c204578182 filesystem: don't consider a mix of storage version when assigning offsets
Storage version 2 is a global setting. Having one disk use storage
version 1 and another with storage version 2 should not be possible and
should not be considered a valid use-case.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-30 15:02:01 +01:00
Olivier Gayot fa351ed7bc
Merge pull request #1446 from ogayot/pr/event-loop-rework
Stop calling deprecated asyncio.get_event_loop() function
2022-10-28 17:50:24 +02:00
Olivier Gayot 638e2cbfbf loop: fix setuptools entry-points not using asyncio.run
setuptools declares a certain number of entry points that use the main
function of the associated component. That said, now that main is an
async function, it does not work. There seems to be no way to tell
setuptools to wrap the call to the entry point with asyncio.run so we
need to revert to a synchronous main function.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-28 17:05:54 +02:00
Olivier Gayot dde0843ee7 client: give the server a sec before signaling it with SIGINT
When the client exits successfully, it signals the server with SIGINT.
Before changing the way the event loop is managed, the server always
exited before being signaled during integrations tests.

Now though, it seems that the server exits slightly after, so it does
often receive the SIGINT during integration tests. When it does, it
prints a KeyboardInterrupt backtrace to its standard error stream.
Integration tests treat this as a failure.

Adding a sleep of 0.1 second before signaling the server with SIGINT
seems to fix the issue. Just to be sure, we are waiting up to one second
before sending the SIGINT.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-28 17:05:54 +02:00
Olivier Gayot a62a0b6002 loop: start running the event loop before doing anything else
This allows us to use asyncio.run() and to avoid many pitfalls.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-28 17:05:54 +02:00
Olivier Gayot 01567251f6 loop: invoke asyncio.create_task() directly
asyncio.create_task() calls asyncio.get_running_loop() under the hood so
there is no need to call get_running_loop() ourselves if the sole
purpose is to create a task.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-28 17:05:54 +02:00
Olivier Gayot 0c67c1a998 identity: mark async a test that requires a running event loop
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-28 17:05:54 +02:00
Olivier Gayot 561fff1d5b
Merge pull request #1336 from ogayot/password-passphrase
Refactor how we handle confirmation fields - use passphrase instead of password where relevant
2022-10-28 14:06:54 +02:00
Michael Hudson-Doyle 8724142592
Merge pull request #1466 from mwhudson/extract-mounter
extract mount handling bits out of AptConfigurer
2022-10-28 01:07:26 +13:00
Michael Hudson-Doyle 508da03862 add a comment 2022-10-27 13:34:15 +02:00
Michael Hudson-Doyle ba498fd816 extract mount handling bits out of AptConfigurer 2022-10-27 09:24:37 +02:00
Dan Bungert 420b8c6c52
Merge pull request #1465 from dbungert/lp1927103-test
model/fs: test swap size 0
2022-10-26 07:24:34 -06:00
Dan Bungert 4b66178ada model/fs: test swap size 0 2022-10-25 18:39:29 -06:00
Dan Bungert bccdff2792
Merge pull request #1459 from mfoliveira/lp1927103
filesystem: fix curtin config to disable swapfile
2022-10-25 18:38:10 -06:00
Olivier Gayot b01f92874b
Merge pull request #1464 from ogayot/autoinstall-doc-fix-discourse-links
doc: fix missing leading / before some discourse links
2022-10-25 17:35:06 +02:00
Olivier Gayot 5acff6d7d0 doc: fix missing leading / before some discourse links
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-25 16:08:14 +02:00
Olivier Gayot 51db154cb8
Merge pull request #1463 from ogayot/autoinstall-doc-update
Autoinstall doc update
2022-10-25 15:45:20 +02:00