Commit Graph

4927 Commits

Author SHA1 Message Date
Carlos Nihelton 97f0f82910
Avoid integration to fail due TCP server timeout
timeout 60 might be too short for someone with lots of network
interfaces.
Since we grab the PID and run the server in the background, the timeout
is not critically necessary.
2022-06-16 16:43:44 -03:00
Dan Bungert 44affdf0f2
Merge pull request #1319 from blackboxsw/drop-deprecated-groups-cloud-config-schema
cloud-config: schema drop deprecated dict user.groups value type
2022-06-16 08:18:38 -06:00
Dan Bungert d616f1f345
Merge pull request #1317 from blackboxsw/fix-dev-apt-deps
deps: fix missing developer dep python3-mock for apt-deps make target
2022-06-16 08:17:39 -06:00
Chad Smith 62ad68bd76 cloud-config: schema drop deprecated dict user.groups value type
Align with latest cloud-init schema avoid using depracated
value types for users. groups definitions in cloud-config.

Also fix get_users_and_groups to return a list instead of
dict as all call sites expected it to return a list.
2022-06-15 21:48:35 -06:00
Chad Smith 36fe76a963 tests: use mock from stdlib unittest to avoid additional test dependency 2022-06-15 19:43:30 -06: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