Commit Graph

6134 Commits

Author SHA1 Message Date
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
Dan Bungert 8e7499ba2e filesystem: ZFS/Zpool may be a mountpoint 2023-07-20 09:06:57 -06:00
Dan Bungert 203b9485a4 filesystem: let ZPool be more like Mount 2023-07-20 09:06:57 -06:00
Dan Bungert 8e084673c5 filesystem: let ZFS handle fstype / path 2023-07-20 09:06:57 -06:00
Michael Hudson-Doyle 5a4686fd01
Merge pull request #1733 from mwhudson/disk-annotations
fix some of the annotations on Disk
2023-07-20 20:03:27 +12:00
Michael Hudson-Doyle 9886826a51
Merge pull request #1732 from mwhudson/reformat-install-media-size-fix
Only consider size not in use when considering disks for guided reformat
2023-07-20 15:51:07 +12:00
Dan Bungert 3dfaa9ccea
Merge pull request #1731 from dbungert/zfs-fixes
Zfs fixes
2023-07-19 19:14:01 -06:00
Michael Hudson-Doyle c2c5c94031 Only consider size not in use when considering disks for guided reformat
And as a bonus make the VariationInfo nicer.
2023-07-20 13:04:56 +12:00
Michael Hudson-Doyle 891c866b3f fix some of the annotations on Disk
Some of these are probably not really Optional but well.
2023-07-20 12:57:37 +12:00
Dan Bungert 9a572996c8
Merge pull request #1729 from dbungert/udi-2252
filesystem: fix ~6GB extra pad on classic min size
2023-07-19 18:34:48 -06:00
Dan Bungert 1c9ada93e8 doc: reference update for guided zfs 2023-07-19 14:54:37 -06:00
Dan Bungert ffc73ff8b1 filesystem: fix failed zpool export
Ordering matters of zpool export, or we get an 'export failed' error.
If one does a force reboot the export was not performed, and we
initramfs-prompt until someone does `zpool import -f $poolname`.
2023-07-19 14:54:37 -06:00
Dan Bungert e79b6e2305 filesystem: guided zfs ordering tweak 2023-07-19 14:54:37 -06:00
Dan Bungert 86b9c5749b examples: guided zfs autoinstall example 2023-07-19 14:54:37 -06:00
Dan Bungert 83c7c6de93 filesystem: log unknown action types 2023-07-19 14:54:37 -06:00
Michael Hudson-Doyle b57087c8da
Merge pull request #1727 from mwhudson/no-apt-configuration-for-core
support core installs a bit more
2023-07-20 08:34:44 +12:00
Dan Bungert c9fcd7d798 filesystem: fix ~6GB extra pad on classic min size 2023-07-19 09:48:08 -06:00
Dan Bungert 1d4b0ff71b
Merge pull request #1728 from mwhudson/curtin-update
update curtin
2023-07-19 09:47:34 -06:00
Michael Hudson-Doyle 55c68b5855 add an integration test to install core and some fixes
Note that it may not be possible to create an fsimage to use as a core
installation source (haven't tried, tbh) but I have upcoming changes to
use a disk image as installation source.
2023-07-19 15:49:32 +12:00
Michael Hudson-Doyle 8c958dda7e update curtin
2495681a support dd-raw:file:// urls
ecd94789 have ChrootableTarget ignore allow_daemons when target == "/"

I need the former for the core desktop installation stuff, the latter to
fix integration tests in some environments.
2023-07-19 15:45:46 +12:00
Michael Hudson-Doyle 0b3a1c2c6a generalize InstallController's handling of installs without apt 2023-07-19 15:41:33 +12:00
Michael Hudson-Doyle 008da97c03
Merge pull request #1723 from mwhudson/reformat-from-rp
offer guided options for the install media
2023-07-19 14:33:46 +12:00
Michael Hudson-Doyle 17c7b65442 include in use information in storage/v2 api 2023-07-19 13:01:01 +12:00