Commit Graph

5026 Commits

Author SHA1 Message Date
Dan Bungert 19631f04ff filesystem: create_partition size from gap
Previously it used the size from the spec
2022-06-15 16:34:07 -06:00
Dan Bungert 8a16a74d34 filesystem: send minimal gaps to create_partition
Before calling create_partition, pre-split gaps to the desired size of
the partition.
2022-06-15 16:34:07 -06:00
Olivier Gayot 2f06d30172 ubuntu-pro: don't assume an overlay is present in show_* functions
show_* functions from the UbuntuProView object always assumed that the
loading overlay was present. When called, they would therefore attempt
to close the overlay. This results in a crash if no overlay is present.

With the current design, it is fine because we never call the show_*
functions without an overlay being present.

However, with new design of Ubuntu Pro, sometimes the show_* functions
will be called without an overlay.

We now delegate the responsibility of removing the overlay by using a
callback system.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-06-15 14:55:12 +02:00
Olivier Gayot 2ee5550c9e ui: add ability to change button label in SomethingFailed message box
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-06-15 11:54:32 +02:00
Dan Bungert df1a5adf0b
Merge pull request #1313 from dbungert/largest-gap-multidisk
gaps: allow largest_gap to accept a list
2022-06-14 18:16:30 -06:00
Dan Bungert c824f971f0 gaps: operate on list of devices 2022-06-14 11:45:57 -06:00
Dan Bungert 11b77e8b2d gaps: use ValueError for split
Callers may want to catch that.
2022-06-14 11:44:53 -06:00
Olivier Gayot a93202e0a1
Merge pull request #1307 from ogayot/subforms-recurse-validation
Check child forms status when disabling/enabling Done button of a form
2022-06-14 15:23:05 +02:00
Dan Bungert ac69be188b
Merge pull request #1300 from dbungert/lp-1975629
debug shell: use a clean environment
2022-06-13 20:18:06 -06:00
Dan Bungert 1fed27f3a5
Merge pull request #1312 from dbungert/iso-ai-file
autoinstall: fix cdrom location
2022-06-13 16:11:23 -06:00
Dan Bungert a6c67bc1e5 autoinstall: fix cdrom location 2022-06-13 14:22:40 -06:00
Dan Bungert 5b30732f14 debug shell: restore orig environment 2022-06-13 14:02:32 -06:00
Dan Bungert 74e118d735 snapcraft: save env vars 2022-06-13 14:02:19 -06:00
Dan Bungert a44939e402
Merge pull request #1309 from dbungert/gap-utils
gap: several utilities
2022-06-13 13:58:49 -06:00
Dan Bungert 1aa1ee5cb0 gaps: add gaps.at_offset 2022-06-13 11:29:18 -06:00
Dan Bungert cb2d184ef2 gaps: add gap.split 2022-06-13 11:29:17 -06:00
Olivier Gayot 7f4a72a12f
Merge pull request #1311 from ogayot/pro-services-auto-enabled
ubuntu-pro: add auto_enabled property for services
2022-06-13 17:45:17 +02:00
Olivier Gayot d67c71e0ba ubuntu-pro: add auto_enabled property for services
The JSON returned by uaclient for a status request contains the
auto_enabled property for each service. This property tells whether a
given service is enabled automatically when `ua attach` is done. We will
need this information going forward so we now include it in the success
response to /ubuntu_pro/check_token:

  {
    "status": "VALID_TOKEN",
    "services": [
      {
        "name": "esm-infra",
        "description": "UA Infra: Extended Security Maintenance (ESM)",
        "auto_enabled": true
      },
      {
        "name": "fips",
        "description": "NIST-certified core packages",
        "auto_enabled": false
      }
    ]
  }

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-06-13 16:01:39 +02:00
Dan Bungert 6933e55843 gaps: test cleanup 2022-06-10 15:45:26 -06:00
Carlos Nihelton 039f5d45c0
Merge pull request #1306 from CarlosNihelton/wsl-tcp-deeng-284
Enables TCPSite for WSL
2022-06-10 12:50:52 -03:00
Dan Bungert e6cfd6b592
Merge pull request #1308 from dbungert/fix-boot-plan-gap
boot: update plans to use a better Gap
2022-06-10 09:12:10 -06:00
Dan Bungert 03f4760e4c boot: update plans to use a better Gap
The Gap object created in boot plans had size == 0, which can cause
problems if create_partition() actually looks at this size.
2022-06-09 16:53:40 -06:00
Olivier Gayot c72e7eec87 form: use subclass of BoundFormField that overrides is_in_error
Instead of using isinstance(self.widget, SubFormWidget) in
BoundFormField.is_in_error, we now implement a BoundSubFormField
class that inherits from BoundFormField. It is meant to be instantianted
for subforms fields only.

This class overrides is_in_error() to perform the additional checks in
the forms' sub-fields.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-06-09 11:28:36 +02:00
Olivier Gayot 10192e9b74 guided: refresh buttons when options are checked/unchecked
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-06-09 11:28:36 +02:00
Olivier Gayot 348195b4d6 form: disable Done button on validation failure of a child form
When the validation of a field fails in a form, we disable the Done
button. With child forms, however, it did not work because they have
their own set of hidden buttons ; that are not the ones the users
interacts with.

This patch makes parent forms recurse on the child forms when checking
if any field is in error. Also, when a child form undertakes validation,
it now propagates to the parent, so that the done button can be
immediately enabled/disabled.

Having a validation error in a child form that is not currently enabled
should not prevent the user from moving forward, so we disable recursion
for child forms that are disabled.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-06-09 11:28:36 +02:00
Carlos Nihelton 0263924386
Adds testing for IPv6.
Currently IPv4 is hardcoded, meaning IPv6 should not work even for
the loopback interface.
2022-06-08 12:17:23 -03:00
Carlos Nihelton 4c9a99e9ce
Asserts that only loopback connections are allowed. 2022-06-08 12:07:58 -03:00
Carlos Nihelton 858241956f
Add a simple test for TCP connectivity. 2022-06-07 14:53:29 -03:00
Carlos Nihelton 7e94f78c0a
Enhance comment and fix typo on it. 2022-06-07 13:27:15 -03:00
Carlos Nihelton 061efddec2
Missed linter warnings. 2022-06-06 17:57:00 -03:00
Carlos Nihelton eff558c8ad
Enables TCPSite for WSL
It listens on 127.0.0.1 only.
2022-06-06 17:42:49 -03:00
Dan Bungert a9ac5a5fb2
Merge pull request #1305 from CarlosNihelton/start-site-deeng-246
Enables variants to override site creation and startup
2022-06-02 12:52:41 -06:00
Carlos Nihelton d69c2eee82
Enables variants to override creation and ...
... startup by exposing the method `start_site`.
2022-06-02 13:15:50 -03:00
Michael Hudson-Doyle 05f057a4e7
Merge pull request #1304 from mwhudson/storage-version-kernel-command-line
take storage version from kernel command line
2022-06-02 20:00:50 +12:00
Michael Hudson-Doyle 736efcb11d take default storage-version from kernel command line 2022-06-02 08:56:40 +12:00
Michael Hudson-Doyle 3d1c8fd6cf convert SubiquityServer.kernel_params to an overengineered class 2022-06-02 08:56:32 +12:00
Dan Bungert 3e0c91e34b
Merge pull request #1302 from dbungert/report-size-mins
filesystem: report estimated partition size minimums
2022-05-31 17:00:18 -06:00
Dan Bungert 69b765efd5 storage/v2: report aligned min size value 2022-05-31 16:34:17 -06:00
Dan Bungert 4d2d6455bf test/api: estimated_min 2022-05-31 09:09:33 -06:00
Dan Bungert b999cbc087 test/api: test_resize cleanup 2022-05-31 09:09:33 -06:00
Dan Bungert 498d220314 test/api: add MachineConfig class
Make it easier to edit machine configs on the fly for test.
2022-05-31 09:09:33 -06:00
Dan Bungert 73853e5769 snapcraft: rev probert 2022-05-31 09:09:33 -06:00
Dan Bungert 40b2f3267b storage/v2: report min part size 2022-05-31 09:09:33 -06:00
Dan Bungert b298caf83a examples: add sample with size info 2022-05-31 09:09:33 -06:00
Dan Bungert 021686d7d9 probert: ask for sizing info 2022-05-31 09:09:33 -06:00
Dan Bungert 0b1c87d460 filesystem: fix and futureproof probert unit test 2022-05-31 09:09:33 -06:00
Didier Roche 95bee59dee
Merge pull request #1303 from CarlosNihelton/wsl-locgen-speedup
[system_setup] Allow skipping locale-gen command
2022-05-31 14:08:07 +02:00
Carlos Nihelton 5a8e2f2835
Allow skipping locale-gen command.
lang-packs post-install hook executes locale-gen.
For certain languages a matrix of locales is generated.
Re-running locale-gen regenerates not only the locale we wanted,
but the whole matrix, causing further delays.

We can save up to 40s (tested on my laptop) by skipping locale-gen if
apt succeeded.

Still useful to run it unconditionally i dry-run since apt won't execute
any post-install hook.
2022-05-31 08:22:41 -03:00
Olivier Gayot ade6f828c9
Merge pull request #1301 from CarlosNihelton/wsl-help-messages
TUI Help/About message customisation point for variants
2022-05-31 09:58:35 +02:00
Dan Bungert d6cbbda685
Merge pull request #1299 from dbungert/fs-probe-no-udev-loops
filesystem: fix udev infinite loop
2022-05-27 11:07:49 -06:00