Michael Hudson-Doyle
96aafc668d
fix some bugs in editing and displaying swap partitions/devices
...
https://bugs.launchpad.net/subiquity/+bug/1828661
2019-05-13 11:15:43 +12:00
Michael Hudson-Doyle
05f9b10974
Replace --uefi with --bootloader to select any bootloader style for dry-run
...
Relatedly, make 'MAKE_BOOT in disk.supported_actions' depend on
bootloader style not architecture.
2019-05-13 09:27:12 +12:00
Michael Hudson-Doyle
9862fa9049
rewrite needs_bootloader_partition
2019-05-13 09:24:14 +12:00
Michael Hudson-Doyle
1b2e819ce1
add and render FilesystemModel.grub_install_device
2019-05-13 09:24:14 +12:00
Michael Hudson-Doyle
c341047b18
give filesystem actions a reference to the model
2019-05-13 09:24:14 +12:00
Michael Hudson-Doyle
be0512011e
start to consolidate knowledge of bootloader type for a system
2019-05-13 09:23:43 +12:00
Michael Hudson-Doyle
1d2d529550
a little refactoring
2019-05-13 09:07:33 +12:00
Dimitri John Ledkov
f9b9414de1
Merge remote-tracking branch 'origin/pull/482/head'
2019-05-11 09:26:26 +01:00
Dimitri John Ledkov
6da492489b
Merge remote-tracking branch 'xnox/refactor-config-creation'
2019-05-11 07:29:44 +01:00
Dimitri John Ledkov
52b8d30e00
Merge remote-tracking branch 'mwhudson/refactor-config-creation'
2019-05-11 07:28:50 +01:00
Dimitri John Ledkov
349eecbd49
unbreak snaplist ui
2019-05-10 23:04:19 +01:00
Dimitri John Ledkov
1b3a23f93d
Merge pull request #474 from mwhudson/fs-action-labels
...
Introduce the idea of filesystem action annotations
2019-05-10 13:47:50 +01:00
Michael Hudson-Doyle
7d5c8d4b70
delete dm_crypt actions when deleting an encrypted volgroup
...
First FilesystemController tests!
2019-05-10 14:27:24 +12:00
Michael Hudson-Doyle
b61a9887a9
Add tests for LVM_VolGroup.annotations
2019-05-10 14:27:24 +12:00
Michael Hudson-Doyle
6041f138ed
Introduce the idea of filesystem action annotations
...
This generalizes the way we display if a VG is encrypted and the way we
display the bootloader partitions, and will be how new/existing is
displayed when reusing existing partitions happens.
2019-05-10 14:27:24 +12:00
Michael Hudson-Doyle
5ba1357207
Merge pull request #480 from mwhudson/lvm-view-tests
...
add simple lvm view tests
2019-05-10 13:02:01 +12:00
Michael Hudson-Doyle
900bd42236
Add tests for LVM_VolGroup.annotations
2019-05-10 12:33:45 +12:00
Michael Hudson-Doyle
c7722bd6e9
add simple lvm view tests
...
I wrote this for another branch then realized it was not of any use for
testing that branch but still worth having
2019-05-10 12:30:27 +12:00
Michael Hudson-Doyle
a03f29102e
Introduce the idea of filesystem action annotations
...
This generalizes the way we display if a VG is encrypted and the way we
display the bootloader partitions, and will be how new/existing is
displayed when reusing existing partitions happens.
2019-05-10 12:12:15 +12:00
Michael Hudson-Doyle
ab4ef05a62
Merge pull request #476 from mwhudson/fstype-defensiveness
...
rework how we handle filesystem types a bit
2019-05-10 12:09:13 +12:00
Michael Hudson-Doyle
57a88ab018
add a bunch of tests for rendering the curtin config
...
also fix the bug this revealed!
2019-05-10 10:27:40 +12:00
Michael Hudson-Doyle
7848d18967
close /etc/machine-id properly when reading it
2019-05-10 10:25:57 +12:00
Michael Hudson-Doyle
bdf33a2adf
make SubiquityModel objects easier to construct
...
So I can write a unittest more easily.
This involves shuffling around how locale changes are done but as my new
design document says the "controller also manages the relationship
between the outside world and the model and views" this does make things
more consistent.
2019-05-10 09:44:01 +12:00
Michael Hudson-Doyle
03bf8d4b0a
Refactor how model configs are combined
...
Basically each model now produces a fragment of a complete curtin config
and they are combined using curtin's merge_config function rather than
SubiquityModel.render knowing the shape of the config produced by each
model.
2019-05-10 08:10:51 +12:00
Dimitri John Ledkov
427fef2e5f
Merge pull request #473 from mwhudson/create-dmcrypt-earlier
...
move special handling of DM_Crypt actions from model to controller
2019-05-09 17:15:40 +01:00
Dimitri John Ledkov
5f844fbfdb
Merge pull request #479 from xnox/real-target-run
...
Have the real /run in-target.
2019-05-09 16:29:10 +01:00
Dimitri John Ledkov
2dddbc9d1a
And setup.py too.
2019-05-09 15:49:05 +01:00
Dimitri John Ledkov
553bfc262a
Fixup subiquity run snapcraft.
2019-05-09 14:15:03 +01:00
Michael Hudson-Doyle
7f9ff2c70e
add separate curthook script to bind mount /run
2019-05-09 10:01:49 +12:00
Michael Hudson-Doyle
7403e99b7b
bind mount /cdrom at /target/cdrom rather than /target/run/cdrom
2019-05-09 09:58:51 +12:00
Dimitri John Ledkov
e0b134f1d8
Have the real /run in-target.
2019-05-08 16:30:21 +01:00
Michael Hudson-Doyle
c8b3f02e11
Merge pull request #475 from xnox/fix-netplan
...
netplan.Config().config should initialize to a dict
2019-05-06 09:26:49 +12:00
Michael Hudson-Doyle
51cf1afc91
Pass fileystem types around as strings rather than FS objects.
...
It's just simpler this way.
2019-05-03 15:32:28 +12:00
Michael Hudson-Doyle
8cfb9cd1b4
do not blow up on a format action that has an unknown fstype
...
we do not know what we might see on an exsiting system
2019-05-03 15:00:01 +12:00
Dimitri John Ledkov
fee6fe6947
netplan.Config().config should initialize to a dict
...
Normally netplan.Config().config is a dict as produced by
yaml.safe_load(). However, on systems without any netplan configs that
is not true. The subiquity code that calls into this function expects
.config to be a dictionary. When it's not
subiquitycore/models/network.py produces traceback that "list does not
have get method" when trying to get 'network' key.
2019-05-02 15:22:23 +01:00
Michael Hudson-Doyle
01224cac45
remove broken, fortunately dead, code
2019-05-02 13:16:22 +12:00
Michael Hudson-Doyle
7ba5bf332d
add a function for iterating over dependencies of an action
2019-05-02 13:15:21 +12:00
Michael Hudson-Doyle
27c2d718c9
reword a comment that has long been out of date
2019-05-02 13:13:12 +12:00
Michael Hudson-Doyle
d6ccebf9bb
have answers-lvm-dmcrypt.yaml edit the vg's encryptedness off and on again
2019-05-02 13:00:42 +12:00
Michael Hudson-Doyle
de515f1c1b
move special handling of DM_Crypt actions from model to controller
...
subiquity only supports encrypting LVM vgs, which implicity wraps each
PV in a DM_Crypt action. Currently these DM_Crypt actions are created
only when the curtin config is rendered but this makes a bunch of model
code less regular. My general philosophy is that the model objects
should reflect "reality" as much as possible and the controller should
handle any lies we tell, so moving the creation/deletion of DM_Crypt
actions there feels better to me.
2019-05-02 13:00:03 +12:00
Michael Hudson-Doyle
62a7f5fbad
Merge pull request #472 from mwhudson/flag-interpretation
...
Flags that do not indicate a bootloader partition are ok_for_raid
2019-05-02 11:13:50 +12:00
Michael Hudson-Doyle
0873225ad6
Flags that do not indicate a bootloader partition are ok_for_raid
...
Existing partitions can turn up with flags like "linux" and these are
fine to put into a RAID. I also checked all the other places we inspect
flag to check they weren't being over strict and they seem fine.
2019-05-02 10:45:57 +12:00
Dimitri John Ledkov
a229c6fbac
Merge pull request #471 from mwhudson/use-mdadms-names-for-raid-levels
...
Use the names mdadm uses for the raid levels in mdadm --detail --export
2019-05-01 13:29:27 +01:00
Michael Hudson-Doyle
f79ad9f74e
Use the names mdadm uses for the raid levels in mdadm --detail --export
...
These names are what end up in udev as MD_LEVEL and so in the probert
output and so will end up in the regenerated curtin config for a system
with an existing RAID. It makes life a little bit easier for subiquity
to use the same names too.
2019-05-01 16:17:48 +12:00
Dimitri John Ledkov
7c87c9c0d3
Merge pull request #470 from mwhudson/reorg-storage-probing
...
reorganize storage probing
2019-04-30 13:54:52 +01:00
Michael Hudson-Doyle
1c216ddd30
improve error text very slightly
2019-04-30 11:33:29 +12:00
Michael Hudson-Doyle
1fefbe1c74
do not show a block device scan failure until we get to filesystem screen anyway
...
want people to be offered the snap update
2019-04-30 11:18:53 +12:00
Dimitri John Ledkov
aa3e3528db
Merge pull request #469 from mwhudson/update-probert
...
update probert to current tip
2019-04-29 11:26:33 +01:00
Michael Hudson-Doyle
15e54321e1
fix lint
2019-04-29 15:59:23 +12:00
Michael Hudson-Doyle
0ffcca67d5
time out an unrestricted storage probe after 5 seconds
2019-04-29 15:59:13 +12:00