Commit Graph

4762 Commits

Author SHA1 Message Date
Dan Bungert bd6647d6ec snapcraft: set source-code and issues fields 2022-04-14 14:02:21 -06:00
Dan Bungert e9f3abc360
Merge pull request #1269 from dbungert/v2-delete
storage/v2: permit delete with storage-version=2
2022-04-14 09:45:22 -06:00
Michael Hudson-Doyle c101e63521
Merge pull request #1268 from mwhudson/translations-update
update translations from https://translations.launchpad.net/subiquity
2022-04-14 11:58:23 +12:00
Dan Bungert 9ba3ef52f8
Merge pull request #1263 from dbungert/lp-1968160
filesystem: going back to guided also does reset
2022-04-13 17:04:56 -06:00
Dan Bungert 569335ef81 storage/v2: permit delete with storage-version=2
On preserved disks, we can now allow partition deletes without requiring
a wholesale format of the disk, if using storage-verison=2.
2022-04-13 16:27:26 -06:00
Michael Hudson-Doyle a2dbc23a4b update from newer export 2022-04-14 10:02:51 +12:00
Michael Hudson-Doyle b07405a744
Merge pull request #1257 from ogayot/mypy-fixes
Some more code cleanup
2022-04-13 12:09:04 +12:00
Michael Hudson-Doyle a3d20bf291 update translations from https://translations.launchpad.net/subiquity/trunk/+pots/subiquity 2022-04-13 11:58:59 +12:00
Olivier Gayot 0217d5e468 filesystem: accept any type as the value of SetAttrPlan
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-04-12 10:04:16 +02:00
Olivier Gayot a63a3ef753 utils: accept sequences of strings as commands
We used to only accept lists of strings for commands. We now accept
sequences of strings instead ; which are lists of strings or tuple of
strings.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-04-12 10:04:16 +02:00
Olivier Gayot 9f5d6d9c08 tests: rename mock variable arun_command
Having a variable named arun_command in tests interferes with tags
generated with ctags: the default tag does not point to the actual
function definition; but to the variable in test_ubuntu_advantage.py.
Excluding the tests when generating the tags would be an option but for
now we'll just rename the variable.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-04-12 10:04:16 +02:00
Olivier Gayot dd788f9eee add assert statements following .communicate() to help type checkers
After calling .communicate() on an asyncio.subprocess.Process object,
the attribute returncode gets set to a non-None value. Type checkers are
not able to figure this out.

Fixed by adding an assert to help type checkers out.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-04-12 10:04:16 +02:00
Olivier Gayot f0ea1d16c2 network: initialize bond, vlan & wlan to None to avoid changing type
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-04-12 09:50:21 +02:00
Olivier Gayot 2cd1cf2659 Avoid redefining types NetworkModel & LogHandler
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-04-12 09:50:08 +02:00
Michael Hudson-Doyle c384d5b617
Merge pull request #1250 from mwhudson/offset-pedantry
keep partition offsets up to date as they are deleted and resized
2022-04-12 10:54:24 +12:00
Dan Bungert dac14e9724
Merge pull request #1255 from dbungert/autoinstall-vs-early-cmds
autoinstall: fix interaction with early-commands
2022-04-11 12:57:23 -06:00
Dan Bungert 8ca83aa9cf file_util: genericize copy routine 2022-04-11 12:51:26 -06:00
Dan Bungert 008b9e2f04 autoinstall: fix interaction with early-commands
Early commands is currently documented as follows:
> The autoinstall config is available at /autoinstall.yaml
> (irrespective of how it was provided) and the file will be re-read
> after the early-commands have run to allow them to alter the config
> if necessary.

The previous change to let cloud take precedence over iso location broke
this functionality.  Fix that by copying to the iso location the file of
choice.
2022-04-11 12:51:26 -06:00
Dan Bungert d69731af7a
Merge pull request #1264 from dbungert/lp-1959971-ctd
boot: further increase suggested sizing: min 1.7G
2022-04-11 10:42:53 -06:00
Dan Bungert 22fa581b66 boot: further increase suggested sizing: min 1.7G
Match the change implemented for Ubiquity 22.04.11,
commit 9d1720f9d749885eb13e4bd9e23e5a832219a3ae.
2022-04-11 10:35:29 -06:00
Dan Bungert 4b2952edb2
Merge pull request #1261 from dbungert/handle-more-app-states
install progress: handle obscure states
2022-04-11 10:18:51 -06:00
Michael Hudson-Doyle 63f32caac7 fix test/diagram discrepancy (although maybe this test should just go) 2022-04-11 14:48:29 +12:00
Michael Hudson-Doyle 134ce89159 remove unnecessary range() 2022-04-11 14:39:37 +12:00
Dan Bungert 4567f009a7 filesystem: going back to guided also does reset
Per LP: #1968160, with 2 or more disks, go to guided storage config, hit
done.  At file system summary, hit back, and choose the other disk.
While this screen does say so, one might not notice that the first disk
is still setup to be formatted.

Instead, when going back to guided storage, a reset is also done.
2022-04-08 16:57:52 -06:00
Dan Bungert fcfa2036dd install progress: handle obscure states
None of these four states should be common, but it is possible at least
to hit CLOUD_INIT_WAIT with an ill-timed server process restart.
2022-04-08 10:41:07 -06:00
Dan Bungert 2df8d4ee86
Merge pull request #1260 from ogayot/LP1968161
storage: log reason for not updating the screen after probing finishes
2022-04-07 12:13:14 -06:00
Olivier Gayot c7c0b71657 storage: log reason for not updating the screen after probing finishes
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-04-07 14:02:57 +02:00
Didier Roche 32fb73b4eb
Merge pull request #1259 from canonical/wsl_remove_systemd
Wsl remove systemd
2022-04-07 11:06:12 +02:00
Jean-Baptiste Lallement a3a21da408 Removed systemd from the UI
We won't ship systemd officially in 22.04, hence remove it from the UI.
However it's still there and distributed and can be enabled manually.

Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2022-04-07 10:55:30 +02:00
Jean-Baptiste Lallement 9ff8e10ef5 Do not run apt update in dry-run mode
update requires root access to the machine and there is no --simulate
option so skip it in dry-run mode.

Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2022-04-07 10:54:18 +02:00
Didier Roche 3deddf76ed
Merge pull request #1258 from CarlosNihelton/fix-snap-path
Ensures snap_dir='/' if not better specified.
2022-04-07 09:06:15 +02:00
Carlos Nihelton d3e2544875
Ensures snap_dir='/' if not better specified.
UDI sets the SNAP env var to '.' for development purposes.

See: https://github.com/canonical/ubuntu-desktop-installer/commit/9eb6f04

It is unlikely that under test or production that env var will
ever by just '.'. On the other hand in dry-run we want this controller
to interpret it as '/' if not properly set, thus discarding the '.'.
2022-04-06 13:25:35 -03:00
Olivier Gayot f3634dc242 Add type hints where necessary to make mypy happy
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-04-06 11:23:34 +02:00
Olivier Gayot 56192938a9 network: fixed typo addressesses -> addresses
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-04-06 11:23:10 +02:00
Didier Roche 1b7ab29e25
Merge pull request #1256 from CarlosNihelton/autoinstall-tui-cli
Enables passing the autoinstall CLI to the server.
2022-04-06 08:46:41 +02:00
Carlos Nihelton c2b6be3cd3
Enables passing the autoinstall CLI to the server.
The server was prepared to receive this CLI option.
TUI was not. When not in dry-run that option had no effect.
2022-04-05 18:12:47 -03:00
Olivier Gayot be9a064c0a
Merge pull request #1254 from ogayot/raid-lvm-enable-eval-once
filesystem: evaluate only once the status of the raid / LVM creation buttons
2022-04-05 16:06:28 +02:00
Olivier Gayot c8c5eb501c filesystem: evaluate only once the status of the raid / LVM creation button
When refreshing the filesystem GUI, we used to set the status (i.e.,
enabled or disabled) of the "Create LVM volume group" and "Create
software RAID" buttons multiple times ; once for each disk found.

When multiple disks are listed, this creates intermediate status changes
that are not wanted, e.g.:
 * "Create software RAID" button gets set to disabled after finding a first
unpartitioned disk ;
 * "Create software RAID" button is set again to disabled after finding
   a partitioned disk (with no unmounted partitions) ;
 * "Create software RAID" button is set to enabled after finding a
   second unpartitioned disk.

Fixed by evaluating the status of the buttons only once after looping
through all disks.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-04-05 11:42:15 +02:00
Michael Hudson-Doyle ce4316fc23 move partitions around on deletion and resize 2022-04-01 16:04:26 +13:00
Michael Hudson-Doyle f24f508796 use movable_trailing_partitions_and_gap_size to compute max_size in PartitionStretchy 2022-04-01 15:56:43 +13:00
Michael Hudson-Doyle f4cd20446a change api to return size, not gap 2022-04-01 15:55:00 +13:00
Michael Hudson-Doyle ebeda433ad teach gaps.movable_trailing_partitions_and_gap about preserved partitions 2022-04-01 15:44:47 +13:00
Michael Hudson-Doyle f8e30f7125 teach gaps.movable_trailing_partitions_and_gap about logical/extended partitions 2022-04-01 15:33:55 +13:00
Michael Hudson-Doyle 0d1f1e2d3c very bare bones version of gaps.movable_trailing_partitions_and_gap 2022-04-01 15:11:39 +13:00
Michael Hudson-Doyle 1e833a5402
Merge pull request #1232 from mwhudson/boot-part-plan
Combine "can this be" and "make this a" boot disk logic
2022-03-31 12:54:22 +13:00
Michael Hudson-Doyle 53bb482541 fix test_v2_add_boot_partition to pass a current gap 2022-03-31 12:47:02 +13:00
Michael Hudson-Doyle f16648b656 make add_boot_disk tests more readable and less repetitive 2022-03-31 12:30:37 +13:00
Michael Hudson-Doyle 58d9670372 refuse to add a boot partition if it means shrinking a partition by more than 50% 2022-03-31 12:30:37 +13:00
Michael Hudson-Doyle fd0a7954e4 do checks for misplaced preserved partitions in validators 2022-03-31 12:30:37 +13:00
Michael Hudson-Doyle 2c942ae9ee factor out common bits of get_boot_device_plan_prep and get_boot_device_plan_uefi 2022-03-31 12:30:37 +13:00