[blivet][master/rhel7-branch] devicefactory and raid (#1148373)

David Lehman dlehman at redhat.com
Thu Oct 2 19:46:53 UTC 2014


Patch 2 is the main event. The others are just things I saw that needed
fixing while I was in there.

We have new code that validates member addition/removal against current
raid level for btrfs. The way the devicefactory toggles encryption of
container members is to remove each one from the container and then re-add
it after either adding or removing the encrypted layer. This triggers the
raid level checks, which raise an exception, thus preventing a valid
configuration change. I want to get to the point where we validate every
raid level change and member set change to ensure devices are always in
a sensible state, so I have to find a way to bypass the checks while
reconfiguring devices via the factory. The obvious way to do that is to
set the raid level to something that does not impose any restrictions on
member count. It seems a little bit dirty, but we always overwrite the
raid levels as part of reconfiguration anyway, so it should be safe. We
still get validation of the member count explicitly in
DeviceFactory._configure and again when we set the raid level.



More information about the anaconda-patches mailing list