Commit Graph

5313 Commits

Author SHA1 Message Date
Olivier Gayot 952ca2f8a3 doc: update quickstart guide for 22.10 release
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-25 09:31:44 +02:00
Olivier Gayot 218eb36ec3 doc: fix default shutdown action which is to reboot
If the autoinstall configuration does not declare a shutdown section,
the default action is not to do nothing ; but to reboot.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-25 09:30:41 +02:00
Olivier Gayot 5d3d83dcbb doc: reword autoinstall introduction that still mentions 20.04
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-25 09:30:23 +02:00
Dan Bungert 0bccbbeed1
Merge pull request #1461 from dbungert/clarify-cloud-init
doc: clarify cloud-init interactions
2022-10-22 10:39:35 -06:00
Dan Bungert 4980206804
doc: improve cloud-init interaction wording
Co-authored-by: Chad Smith <chad.smith@canonical.com>
2022-10-22 10:29:06 -06:00
Olivier Gayot 277c7c9a29
Merge pull request #1460 from ogayot/autoinstall-reference-update
autoinstall reference documentation update
2022-10-21 10:03:06 +02:00
Olivier Gayot 0c4e6872a2 doc: document "kernel" section in autonistall-reference
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-21 09:50:33 +02:00
Olivier Gayot 37b1db83bd doc: document "shutdown" section in autoinstall-reference
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-21 09:50:33 +02:00
Olivier Gayot f581afb855 doc: document "updates" section in autoinstall-reference
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-21 09:50:33 +02:00
Olivier Gayot 3aa20a2b89 doc: document "timezone" section in autoinstall-reference
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-21 09:50:33 +02:00
Dan Bungert 01f2dee8ce doc: clarify cloud-init interactions 2022-10-20 17:23:18 -06:00
Olivier Gayot de389c8fc5 doc: document "ubuntu-pro" section in autoinstall-reference
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-20 16:10:27 +02:00
Olivier Gayot 102f2fa584 doc: document "drivers" section to autoinstall-reference
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-20 16:10:27 +02:00
Olivier Gayot 8951cf0e04 doc: document "source" section in autoinstall-reference
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-20 16:10:20 +02:00
Olivier Gayot ebe22945da doc: consistency fixes for autoinstall doc
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-20 15:48:15 +02:00
Olivier Gayot cf657c1161 doc: import latest JSON schema in autoinstall doc
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-20 15:47:49 +02:00
Olivier Gayot ba40c4c6eb doc: escape asterisks in markdown
Vim seems lost and breaks syntax highlighting when it is dealing with
unescaped asterisks in the markdown content. Let's escape the asterisks
to make it happy.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-20 15:46:52 +02:00
Olivier Gayot 75e727af4f
Merge pull request #1458 from ogayot/autoinstall-doc-import
Import autoinstall docs from discourse and add ability to run link substitutions before exporting
2022-10-20 11:09:08 +02:00
Olivier Gayot c811cc72f8 doc: implement link substitution mechanism
Running 'make' or 'make html' will now convert the links to .md files
into links to .html files so that the documentation can be browsed
locally as HTML files. This will also produce the HTML output under
html/.

Running 'make discourse' will convert the links to .md files into links
to the existing discourse pages. The output MD files will be placed
under discourse/

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-20 09:50:10 +02:00
Olivier Gayot 14ce18f8b2 doc: use better links in s390x page
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-20 09:50:09 +02:00
Olivier Gayot 85e1a858a8 doc: build with pandoc
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-20 09:50:09 +02:00
Olivier Gayot 747cfc50f6 doc: make links to anchors work with pandoc
For some reason, pandoc seems to struggle to create anchor links if
there is no space between the <a> tag and the title. Add a newline to
make it happy.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-20 09:50:09 +02:00
Olivier Gayot a4f70ce464 doc: import autoinstall markdown documents from discourse
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-20 09:50:09 +02:00
Olivier Gayot 43d1206855
Merge pull request #1456 from ogayot/LP1993257
storage: make GET /storage return the last successful probe result when requested
2022-10-18 17:40:55 +02:00
Olivier Gayot 0a954645d6 storage: make GET /storage return the last successful probe when requested
In the following patch:

  4c59e1ee never return a PROBING response from guided_POST

we fixed a UI crash occurring when a storage probing operation was
ongoing while the user would enter the partitioning screen with "Use
an entire disk".

To address the issue, we made POST /storage/guided return the last
(cached) successful probe result rather than returning a potential
PROBING status result.

That being said, when "Custom Storage Layout" is selected, we are using
a different HTTP call: GET /storage which can also return a PROBING
status result. So our fix was only partial.

This patch adds a "use_cached_result" parameter (which defaults to
false) to GET /storage. This makes the call return the last successful
probe result.

When the client selects "Custom Storage Layout" we now explicitly
request a cached result so that we don't have to deal with a potential
PROBING status response.

Ideally, we should either:

 * make the client aware that a PROBING status can be returned and act
   accordingly.
 * pass the wait=true argument to GET /storage or POST /storage/guided

But doing so has other implications and the kinetic release is imminent.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-18 15:27:51 +02:00
Dan Bungert 87a9876ef7
Merge pull request #1453 from ogayot/LP#1992977
drivers: make overlay unmount error not fatal
2022-10-17 09:22:35 -06:00
Olivier Gayot 6954b309e6 drivers: do not consider overlay cleanup error fatal
For some reason that we have not yet determined, the overlay that we use
for the drivers code sometimes fails to unmount with EBUSY.

When it happens, the _list_drivers task would fail, making subsequent
GET calls to /drivers?wait=true fail as well and produce an error
report.

We now mark failures in the overlay unmount operation as non fatal.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-17 12:42:30 +02:00
Olivier Gayot aae52dd6ba apt: introduce OverlayCleanupError in overlay context manager
The apt.overlay construct unmounts the overlay at the end of the with
body. To do so, it leans on subprocess.run(["umount", ...], check=True).

If we want to catch the unmount error, we need to do:

  try:
      with apt.overlay():
          # do stuff
  except subprocess.CalledProcessError:
     # handle the unmount exception

However, we do not want the subprocess exceptions that happen in
the with body to be caught in the same except block.

If the umount call fails, we now wrap the exception in a
OverlayCleanupError ; therefore we can make the distinction between an
unmount error and a subprocess error that would happen in the body.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-17 12:31:31 +02:00
Dan Bungert 7387625e8d
Merge pull request #1452 from dbungert/lp-1992990-flash-kernel
curtin: rev for flash-kernel fix
2022-10-14 16:20:49 -06:00
Dan Bungert 1c59596913 curtin: rev for flash-kernel fix
LP: #1992990
2022-10-14 16:10:36 -06:00
Dan Bungert 36705829ff
Merge pull request #1450 from dbungert/guided-lvm-bad-offset
filesystem: ensure bootfs at aligned size
2022-10-12 08:42:52 -06:00
Dan Bungert 62ed92505a filesystem: ensure bootfs at aligned size
Certain disk sizes could trigger unaligned bootfs size.  This can result
in the next partition overlapping into the bootfs partition.

LP: #1992541
2022-10-11 20:45:57 -06:00
Dan Bungert c2e1daa35c
Merge pull request #1449 from dbungert/autoinstall-umount
apt: workaround umount failure
2022-10-11 18:54:13 -06:00
Dan Bungert 24c28a89c2 apt: workaround umount failure
When the apt overlay fails to umount, this directory removal will also
fail due to the mount still being present.

LP: #1992531
2022-10-11 17:07:26 -06:00
Michael Hudson-Doyle c1dd281040
Merge pull request #1444 from mwhudson/device-paths
track fs model objects device paths
2022-10-11 13:09:41 +13:00
Michael Hudson-Doyle c2c8460b50 remove with_context decorator from CurtinPartitioningStep.run
To avoid having nested contexts for one step. It's a bit unsatisfying
because conceptually the code in CurtinPartitioningStep.run should be
considered part of the same context but I don't see a good way to do
that and it's not of practical significance.
2022-10-06 14:01:27 +13:00
Michael Hudson-Doyle 631fbcad6a
Merge pull request #1443 from mwhudson/snapdapi-again
rich snapdapi again
2022-10-06 13:48:25 +13:00
Michael Hudson-Doyle 8b47359ef2 update filesystem model object paths after curtin runs 2022-10-05 16:52:10 +13:00
Michael Hudson-Doyle 8e658998ef add "path" attributes to fs model objects that curtin now provides a path for 2022-10-05 16:14:22 +13:00
Michael Hudson-Doyle 501054329f update curtin 2022-10-05 16:12:41 +13:00
Michael Hudson-Doyle b57139de9c the publisher is not returned by the API for a unasserted snap 2022-10-05 15:29:52 +13:00
Michael Hudson-Doyle faf78a1be1 Revert "Merge pull request #1442 from mwhudson/main"
This reverts commit cc33a668a2, reversing
changes made to f219cd717e.
2022-10-05 15:28:39 +13:00
Michael Hudson-Doyle f5dd2ec01f
Merge pull request #1431 from mwhudson/cleaner-cdrom-cleanup
remove special cases around mounting/unmounting /target/cdrom
2022-10-05 15:01:59 +13:00
Michael Hudson-Doyle cc33a668a2
Merge pull request #1442 from mwhudson/main
Revert "Merge pull request #1435 from mwhudson/snapdapi"
2022-10-05 14:47:58 +13:00
Michael Hudson-Doyle 1a68b4759c Revert "Merge pull request #1435 from mwhudson/snapdapi"
This reverts commit f219cd717e, reversing
changes made to 7fe070dec3.
2022-10-05 14:37:34 +13:00
Michael Hudson-Doyle f219cd717e
Merge pull request #1435 from mwhudson/snapdapi
create and use a more richly typed snapd api
2022-10-05 14:14:23 +13:00
Michael Hudson-Doyle 7fe070dec3
Merge pull request #1440 from mwhudson/small-serialization-tweaks
small serialization and api tweaks
2022-10-05 13:53:18 +13:00
Olivier Gayot 9232561393
Merge pull request #1433 from ogayot/LP1989977-extended-partition-no-size
filesystem: accept extended partition with size -1 in autoinstall
2022-10-04 10:39:50 +02:00
Olivier Gayot 73d9ecd1be filesystem: fix logical part. using gap outside extended
When defining a partition with size: -1, the partition should expand to
the size of the largest gap. To determine which gap to use, we call the
function largest_gap(partition.disk).

That being said, the gap returned is sometimes bigger than expected when
using a msdos partition table. This happens because we return the
largest gap without checking if it is inside or outside the extended
partition.

Fixed by making sure that:

* for a logical partition, we pick the largest gap within the extended
  partition
* for a primary partition, we pick the largest gap outside the extended
  partition (if any).

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-04 09:39:12 +02:00
Olivier Gayot 45a00c0864 gaps: mark ptable as dos for tests with extended partitions
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-04 09:39:12 +02:00