[blivet:rhel7/master 0/2] #1076055 patches

mulhern amulhern at redhat.com
Tue Sep 16 17:26:03 UTC 2014


The idea here is to handle the complexities of changing the size of a LUKS 
device in blivet rather than in anaconda. In anaconda it requires a lot of
judicious deciding when to use use_dev or device in _save_right_side
starting around line 1614 and ending around 1674. If the problem is
approached in that way, however, reasonable actions outside anaconda, like:

dev = b.devicetree.getDeviceByName("rhel-root")
fmt = blivet.formats.getFormat("luks", device=dev.path, passphrase="redhat")
b.formatDevice(dev, fmt)
luks = blivet.devices.LUKSDevice("luks-" + dev.name, parents=[dev])
b.createDevice(luks)
b.resizeDevice(luks, Size("11 GiB"))

still fail.

Handle the problem in blivet instead, and this reasonable action will succeed.
Resizing the device in anaconda will succeed as well.

Testing with the above reproducer shows everything going just as it should,
i.e., devices are resized exactly as requested, except that lvm.lvresize()
reports that it is "Rounding size to boundary between physical extents.",
so that the logical volume device ends up exactly 11 GiB (rather than
11 GiB + crypto.LUKS_METADATA_SIZE). However, I think that solving that
problem is beyond the scope of this bug.

There is an accompanying anaconda patch, coming soon.

mulhern (2):
  Handle size related attributes of LUKSDevice in blivet (#1076055)
  Revert "Make space for LUKS metadata if creating encrypted device
    (#1038847)"

 blivet/devicefactory.py | 12 +-----------
 blivet/devices.py       | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 11 deletions(-)

-- 
1.9.3



More information about the anaconda-patches mailing list