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

Brian C. Lane bcl at redhat.com
Thu Oct 2 21:36:07 UTC 2014


On Thu, Oct 02, 2014 at 02:46:53PM -0500, David Lehman wrote:
> 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.

That does seem a bit ugly, but as long as that state cannot persist it
should be ok.

Ack to these.

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)


More information about the anaconda-patches mailing list