Commit Graph

4416 Commits

Author SHA1 Message Date
Olivier Gayot d345cf999a Use autoinstall for ubuntu-advantage in integration tests
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-01-04 17:58:46 +01:00
Olivier Gayot 76278f4d74 Add support for ubuntu-advantage in autoinstall
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-01-04 17:53:36 +01:00
Dan Bungert 73bc16b8fb
Merge pull request #1140 from ogayot/FR-1652
Add initial integration of Ubuntu Advantage in Subiquity
2021-12-16 16:55:46 -07:00
Dan Bungert 7b3459ea9e
Merge pull request #1147 from ogayot/exception-string-interpolation
Fix exception messages not interpolated properly
2021-12-16 16:26:50 -07:00
Olivier Gayot 68b9c42fac Fix exception messages not interpolated properly
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2021-12-16 11:35:40 +01:00
Olivier Gayot 5403222956 Skip the UbuntuAdvantage screen until we can validate the token
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2021-12-16 11:07:10 +01:00
Olivier Gayot fe4b6fde6f Only show UA screen if running on LTS release
The UA screen is now shown only if we are running on an LTS release.
In dry-run mode, we pretend to always be on Ubuntu focal.

To implement the possibility to skip the screen, we added another POST
resource to inform the server that we are finished configuring
UbuntuAdvantage.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2021-12-16 11:06:09 +01:00
Michael Hudson-Doyle 784a46845f
Merge pull request #1143 from mwhudson/partition-gaps
add an object to represent a gap between partitions
2021-12-16 15:51:57 +13:00
Dan Bungert 85a3c6a526
Merge pull request #1144 from ogayot/minor-fixes
Minor fixes in Makefile and tests
2021-12-14 08:05:31 -07:00
Olivier Gayot 9b638270bc Update Makefile .PHONY targets
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2021-12-13 20:20:32 +01:00
Olivier Gayot 2b34458d14 Fix typo in test class name TestSnapSnap -> TestSnap
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2021-12-13 20:15:28 +01:00
Olivier Gayot 4a60ac815b Add copyright and module docstring for snap.py
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2021-12-13 20:15:28 +01:00
Olivier Gayot bac0722e9a Remove .gitmodules since we're not using submodules anymore
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2021-12-13 20:15:28 +01:00
Olivier Gayot babe47f96c Make Makefile unit recipe use same python variable as other recipes
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2021-12-13 20:15:13 +01:00
Michael Hudson-Doyle 83cfdbdfea replace free_for_paritions with largest_gap_size 2021-12-13 20:34:25 +13:00
Michael Hudson-Doyle 5429e97854 kill off CREATE_LV action 2021-12-13 20:34:25 +13:00
Michael Hudson-Doyle 574697246d move "add partition" to gap 2021-12-13 20:34:25 +13:00
Michael Hudson-Doyle d78db0883c use parts_and_gaps in filesystem view 2021-12-13 20:34:25 +13:00
Michael Hudson-Doyle 345bd14707 add a Gap type to represent the part of a disk that is not covered by a partition 2021-12-13 20:34:23 +13:00
Michael Hudson-Doyle baa8465ded
Merge pull request #1137 from mwhudson/move-apt_configurer-to-mirror-controller
move apt configurer to mirror controller
2021-12-13 15:25:04 +13:00
Dan Bungert a55f90fc87
Merge pull request #1142 from dbungert/probert-revert
probert: rollback to pre os-prober
2021-12-08 16:25:16 -07:00
Dan Bungert 90d764af36 probert: rollback to pre os-prober
Rollback the Probert version until os-prober is correctly present in the
Subiquity snap.
2021-12-08 16:18:36 -07:00
Olivier Gayot 1c9c04d55d Add initial integration of Ubuntu Advantage in subiquity
Introduce a new view, model and controllers pair to enable Ubuntu
Advantage from Subiquity. For now, we expect the user to input an
alphanumeric token and rely on cloud-init to enable the features
associated with the subscription.

This implementation comes with a number of limitations:
 * inability to validate the token before first-boot
 * inability to check what features are associated with the Ubuntu
   Advantage subscription, before first-boot
 * the user must input the token directly: there is no mechanism to
   deduce the token based on email address and password.

The new screen is placed after the identity scree. The installation
should already be running when the UA screen will be shown to the user.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2021-12-08 23:25:39 +01:00
Michael Hudson-Doyle 447b5730ec refactor the lowerdir_for calculation and fix a bug 2021-12-09 09:52:52 +13:00
Michael Hudson-Doyle 45ef2338cd another small refactor 2021-12-09 09:52:52 +13:00
Michael Hudson-Doyle 06d42129a4 do the apt config application asap 2021-12-09 09:52:52 +13:00
Michael Hudson-Doyle 93432ccbb1 split apt configuration into two methods 2021-12-09 09:52:49 +13:00
Michael Hudson-Doyle 75d9f38dd1 refactor apt configuration a bit
using some stuff I originally wrote for livefs-editor
2021-12-09 09:51:18 +13:00
Michael Hudson-Doyle 2de2ef7381 move apt_configurer to MirrorController 2021-12-09 09:51:18 +13:00
Michael Hudson-Doyle 794667fecd move setting up installation source to SourceController 2021-12-09 09:51:18 +13:00
Dan Bungert c708716db8
Merge pull request #1141 from dbungert/lp-1953619
apt: get settings from mirror + proxy
2021-12-08 13:41:27 -07:00
Dan Bungert 0c28c13887 apt: get settings from mirror + proxy 2021-12-08 12:13:40 -07:00
Dan Bungert 55b2d4cf86
Merge pull request #1128 from CarlosNihelton/fix-integration-cls-empty
Complementary to 1127 on integration side
2021-12-07 15:44:36 -07:00
Dan Bungert a80b750e0f
Merge pull request #1139 from dbungert/os-prober-v2
storage/v2: add os-prober data
2021-12-07 14:38:03 -07:00
Dan Bungert a61e609ec7 storage/v2: add osprober data to Partition 2021-12-07 14:04:57 -07:00
Dan Bungert 49c20f7894 probert: rev for os-prober 2021-12-07 11:46:28 -07:00
Dan Bungert c4a9b6a1d6 examples: add os-prober to win10 2021-12-07 11:46:28 -07:00
Michael Hudson-Doyle b49c4e5cdc
Merge pull request #1138 from jpnurmi/disk-model-vendor
filesystem: add disk model and vendor name
2021-12-07 12:38:50 +13:00
Dan Bungert 60d8ae57b7
Merge pull request #1134 from ogayot/FR-1509
Compare the snaps versions to avoid suggesting a downgrade
2021-12-06 07:48:59 -07:00
J-P Nurmi bd4e4785a9 filesystem: add disk model and vendor name
Read ID_MODEL/VENDOR_ENC for disks to allow the GUI installer to show
pretty disk names without having to call libudev through FFI.

As a bonus, this also fixes disk names to match the machine config in
dry-run mode.

Related issues
- FR-1710
- canonical/ubuntu-desktop-installer#415
2021-12-06 08:59:34 +01:00
Michael Hudson-Doyle 97149e0ada
Merge pull request #1136 from mwhudson/lp-1952969
pass -t /target to the system-install command
2021-12-02 13:01:58 +13:00
Michael Hudson-Doyle 8d96e1b8ed pass -t /target to the system-install command
(oops)
2021-12-02 12:47:02 +13:00
Michael Hudson-Doyle 00a870e054
Merge pull request #1135 from mwhudson/apt-configurtion-progress
pass install context to configure_apt method
2021-12-02 11:31:35 +13:00
Michael Hudson-Doyle 5d6ffe64b5 pass install context to configure_apt method
this makes the apt configuration appear in the progress view in the
client
2021-12-02 11:07:19 +13:00
Olivier Gayot 4273164ce7 Support a version number that includes the git build number
When comparing version numbers (i.e., to determine if we want to suggest
and upgrade of subiquity) we now support version numbers of the
following form:

  {major}.{minor}.{patch}+git{build_id}.{commit_id}

The commit ID is ignored in the resolution because it is not a number
that is growing.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2021-12-01 22:17:56 +01:00
Dan Bungert 0d980904ac
Merge pull request #1133 from dbungert/api-test-probert
make: api depend on gitdeps
2021-12-01 13:12:22 -07:00
Olivier Gayot 2f9c7399ca Compare the snaps versions to avoid suggesting a downgrade
In specific scenarios, the version of the snap as returned by snapd is
older than the version currently running. When that happens, we were
suggesting the user to update. This action would effectively result in a
downgrade.

We now attempt to determine if the snapd version is greater than the one
currently running. If we can't the behavior is unaffected.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2021-12-01 20:01:09 +01:00
Dan Bungert b0167af6e7 make: api depend on gitdeps 2021-12-01 11:55:44 -07:00
Carlos Nihelton 22a8219cb3 Dryrun won't stop configure controller due C-L-S
- Also noticed a possible unbound var in IOError handler.
2021-11-24 11:35:31 -03:00
Dan Bungert cde7150446
Merge pull request #1058 from dbungert/fr-1187-apt-components-v2
apt: disable_components
2021-11-23 11:12:24 -07:00