Commit Graph

6256 Commits

Author SHA1 Message Date
Dan Bungert cb37d581b5
Merge pull request #1748 from dbungert/mantic-ci-regression
network: fix NETPLAN_CONFIG_ROOT_READ_ONLY tests
2023-08-01 21:25:12 -06:00
Dan Bungert e7d7090dc7 network: fix NETPLAN_CONFIG_ROOT_READ_ONLY tests 2023-08-01 21:02:28 -06:00
Dan Bungert 201fbfdfc6
Merge pull request #1746 from dbungert/workflow-no-kinetic
workflow: -kinetic
2023-07-27 13:47:49 -06:00
Dan Bungert 57ca6b0af4 workflow: -kinetic 2023-07-27 12:31:40 -06:00
Dan Bungert 0969abc0e5
Merge pull request #1744 from dbungert/tox-but-faster
tox: use skip_install to speed up black/isort
2023-07-25 20:03:03 -06:00
Dan Bungert ee01e38846 tox: use skip_install to speed up black/isort 2023-07-25 18:29:22 -06:00
Dan Bungert 5dc6eebf73
Merge pull request #1743 from dbungert/cloud-init-combined-log
cloudinit: tweak logs on combined json error cases
2023-07-25 17:36:24 -06:00
Dan Bungert 2907f87411 cloudinit: tweak logs on combined json error cases 2023-07-25 17:28:47 -06:00
Dan Bungert 191304529e
Merge pull request #1742 from dbungert/zfs_swappart
zfs guided: create a swap partition
2023-07-25 16:50:47 -06:00
Dan Bungert 694223e97e filesystem: drop print in unittests 2023-07-25 16:36:11 -06:00
Dan Bungert a216dff4d0 filesystem: swap partition creation for zfs guided 2023-07-25 16:36:11 -06:00
Dan Bungert 3b72241a4d snapcraft: update curtin for swap size avail 2023-07-25 16:35:58 -06:00
Dan Bungert ec2574009a
Merge pull request #1735 from dbungert/consume-combined-cloud-config
Obtain autoinstall from combined-cloud-config
2023-07-25 16:33:08 -06:00
Michael Hudson-Doyle 7b90b67a97
Merge pull request #1737 from mwhudson/leave-rp-mounted
mount rp at predictable path and leave it mounted
2023-07-26 10:23:55 +12:00
Dan Bungert c1d91d6b99 cloudinit: log access to combined-cloud-config
Co-authored-by: Chad Smith <chad.smith@canonical.com>
2023-07-25 16:21:22 -06:00
Dan Bungert 751119866e server: load ai from combined-cloud-config.json
Attempt to load autoinstall from
/run/cloud-init/combined-cloud-config.json first, if present.
Fallback to existing methods, which requires that cloud-init in the snap
is able to unpickle the data created by cloud-init outside the snap.
See also LP: #2022102.
2023-07-25 16:17:43 -06:00
Michael Hudson-Doyle 3e2c8be86b mount rp at predictable path and leave it mounted
I have a use case for wanting to manipulate the rp contents in a late-command.
2023-07-26 10:00:52 +12:00
Dan Bungert 2a8f1cf191
Merge pull request #1738 from dbungert/code-format-enforce
enforce code format with black + isort
2023-07-25 15:51:30 -06:00
Dan Bungert 88a584e040 add .pre-commit-config.yaml 2023-07-25 15:28:44 -06:00
Dan Bungert b71662e726 workflow: add black and isort format checks 2023-07-25 15:28:44 -06:00
Dan Bungert 8e65fead3f add .git-blame-ignore-revs 2023-07-25 15:28:44 -06:00
Dan Bungert c08fdab2f8 one-off format of long lines with black 2023-07-25 15:27:49 -06:00
Dan Bungert 34d40643ad format with black + isort 2023-07-25 15:27:42 -06:00
Dan Bungert 93a34a64fa CONTRIBUTING: update for format requirements 2023-07-25 15:25:55 -06:00
Dan Bungert f5de7dd030 models/tests: fix lint
black will reformat this in a manner that trips flake8.
2023-07-25 15:25:55 -06:00
Dan Bungert ff8d890f2a system_setup: fix lint
black will reformat this in a manner that trips flake8.
2023-07-25 15:25:55 -06:00
Dan Bungert 5c6a488060 models: fix lint
black will reformat this in a manner that trips flake8.
2023-07-25 15:25:55 -06:00
Dan Bungert 97d380175f flake8: compat with black 2023-07-25 15:25:55 -06:00
Dan Bungert 97fab001d6 make: add targets format,black,isort 2023-07-25 15:25:55 -06:00
Dan Bungert bd94ec314b make: cleanup flake8
We've been using the distro flake8 for some time.  Also tox -e flake8 is
broken.  Just remove this note.  Also drop unneded trailing slashes.
2023-07-25 15:25:55 -06:00
Dan Bungert da4df7a725 tox: remove unused environments, add black,isort
All the existing environments were unused and broken. Remove them.
Add black and isort environments to help run a consistent version.
2023-07-25 15:25:55 -06:00
Dan Bungert 6b37ba4c55 pyproject: create
start a pyproject.toml file, as black will only read config from it.
2023-07-25 15:25:55 -06:00
Dan Bungert fa37fd708a setup: fix bdist_wheel 2023-07-25 15:25:55 -06:00
Dan Bungert c76ef49577
Merge pull request #1741 from dbungert/dry-run-shutdown
shutdown: move to command runner
2023-07-24 16:38:36 -06:00
Michael Hudson-Doyle 307f3b5c0a
Merge pull request #1740 from mwhudson/no-identity-reset-only
do not require identity data when reset_partition_only
2023-07-25 10:36:03 +12:00
Dan Bungert 125c590fdd shutdown: move to command runner
The app command runner already knows if we're dry-run or not, so move to
that.  This allows us to skip more command runs, in particular
`journalctl -b`.  For my current reboot the integration tests run in
half the time!
2023-07-24 15:31:29 -06:00
Michael Hudson-Doyle d824742aff do not require identity data when reset_partition_only 2023-07-25 09:11:23 +12:00
Michael Hudson-Doyle 542f34572f
Merge pull request #1739 from mwhudson/fix-mount-detection
fix detection of mounted partitions
2023-07-25 08:56:38 +12:00
Michael Hudson-Doyle b3dafb250b fix detection of mounted partitions
Even if we are going to ignore a mountpoint, we still need to process
its children...

Add machine config where the installer is running from a partition of a
disk you might want to install to, and an api test.
2023-07-24 12:41:35 +12:00
Dan Bungert e84b3dda8f
Merge pull request #1530 from blackboxsw/use-cloudinit-for-networking
subiquity.network: cloud-init networking when netplan root-readonly
2023-07-21 14:29:13 -06:00
Chad Smith 2af582984c subiquity.network: cloud-init networking when netplan root-readonly
When cloudinit.features.NETPLAN_CONFIG_ROOT_READ_ONLY is True,
cloud-init will write /etc/netplan/50-cloud-init.yaml as read-only
root.

This added security allows for subiquity to use cloud-init's
network renderer directly allowing both datasource and network
configuration passed in one place.

Read cloud-init features from
/run/cloud-init/combined-cloud-config.json when present.

Any netplan wifi configuration can be specified in a single
root-read-only network config file
/etc/cloud/cloud.cfg.d/90-installer-network.cfg instead of
having a separate config file for wifi, which could contain
credentials.

This simplifies golden image creation from images installed using
subiquity because image builders will not need to track down and
purge separate /etc/netplan/00-installer-config.yaml and
/etc/netplan/subiquity-disable-cloudinit-networking.cfg when preparing
a golden image.

Eventually, netplan config validation and cloudinit will support
separation of sensitive configuration by cloud-init without needing
to pre-categorize sensitive information.

This will allow cloud-init to grow to ability to write separate
world-readable configuration from config which is security sensitive
with no change needed in subiquity.
2023-07-21 13:46:50 -06:00
Dan Bungert 38bb450136
Merge pull request #1730 from dbungert/zfs-action-ordering
Zfs action ordering
2023-07-21 09:55:50 -06:00
Michael Hudson-Doyle a9828edbb5
Merge pull request #1736 from mwhudson/dump-crash-files-in-ci
runtests.sh: dump crash files to stdout in CI
2023-07-21 12:07:49 +12:00
Michael Hudson-Doyle 06c89ce749
Merge pull request #1734 from mwhudson/hybrid-autoinstall
fix autoinstalling core boot classic and add integration and unit tests
2023-07-21 12:07:41 +12:00
Michael Hudson-Doyle f08830cd71 fix autoinstalling core boot classic and add integration and unit tests 2023-07-21 11:39:50 +12:00
Michael Hudson-Doyle cab3f072cd runtests.sh: dump crash files to stdout in CI 2023-07-21 11:37:36 +12:00
Dan Bungert a258f20e6a filesystem: strict canmount 2023-07-20 12:20:19 -06:00
Dan Bungert 7da80945e9 filesystem: let create_zpool be opinionated 2023-07-20 12:15:27 -06:00
Dan Bungert 9dab634ade filesystem: stricter zfs canmount tests 2023-07-20 12:15:22 -06:00
Dan Bungert 846098027c filesystem: handle 'Mountlike.path is None' 2023-07-20 12:15:17 -06:00