This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/583/

Ship it!

src/lmi/storage/LMI_ExtentEncryptionConfigurationService.py (Diff revision 2)
86
        args = {'Goal':param_goal,
87
                'InExtent':param_inextent,
88
                'Passphrase':param_passphrase}
89
        check_empty_parameters(**args)
If I'm reading the code right, Goal is not used and can be empty (maybe *should* be empty).

src/lmi/storage/LMI_ExtentEncryptionConfigurationService.py (Diff revision 2)
244
        (device, _) = provider.get_format_for_name(formatname)
245
        if not device:
246
            raise pywbem.CIMError(pywbem.CIM_ERR_FAILED,
247
                                  "Device disappeared: " + formatname['Name'])
It might be worth checking that there really is LUKSFormat on the device... it may be reformatted in the meantime.

src/lmi/storage/LMI_ExtentEncryptionConfigurationService.py (Diff revision 2)
267
        extent = self.provider_manager.get_name_for_device(device)
After do_storage_action ( = blivet reset), the device is no longer valid, find a new one as in _create_encryption_format.

src/lmi/storage/LMI_ExtentEncryptionConfigurationService.py (Diff revision 2)
353
        luksdevice = blivet.devices.LUKSDevice(device.format.mapName,
354
                                               size=device.size,
355
                                               uuid=device.format.uuid,
356
                                               sysfsPath=device.sysfsPath,
357
                                               format=device.format,
358
                                               parents=[device],
359
                                               exists=True)
Why do you create new LUKSDevice, it must be already in the DeviceTree. I guess simple deviceTree.getChildren(device) must return it.

I wonder why the code below works at all ;)

Overall, it looks really well done. Just LMI_StorageExtent.provides_device() needs an update (don't you see 2 CIM_StorageExtents for opened LUKS device? One LMI_StorageExtent and second LMI_LUKSStorageExtent).

Also, I miss LMI_LUKSBasedOn association between the device with LUKS format and opened LUKS device, see LMI_MDRAIDBasedOn for inspiration, but that can be separate patch.

- Jan Safranek


On August 14th, 2013, 2:55 p.m. CEST, Jan Synacek wrote:

Review request for OpenLMI Developers.
By Jan Synacek.

Updated Aug. 14, 2013, 2:55 p.m.

Repository: openlmi-storage

Description

Add LUKS version 1.

Only LMI_LUKSFormat and LMI_ExtentEncryptionConfigurationService are
implemented. Howerever, these two classes add most of the LUKS
functionality. Setting and Capability classes were omitted.

Diffs

  • mof/LMI_Storage-JobResult.mof (42051181aa2d78bd84c9ec7274bea1b75ef9de04)
  • mof/LMI_Storage-Luks.mof (3b7ba8e4fd000acdb1cf4232b8ec18120c4a5029)
  • mof/LMI_Storage.reg (cf690b166800bd3e4d15da506d86e60777215080)
  • src/lmi/storage/FormatProvider.py (79c61fa08688db3d1c636fdd7c36a6c518d74255)
  • src/lmi/storage/LMI_ExtentEncryptionConfigurationService.py (PRE-CREATION)
  • src/lmi/storage/LMI_LUKSFormat.py (PRE-CREATION)
  • src/lmi/storage/LMI_LUKSStorageExtent.py (PRE-CREATION)
  • src/lmi/storage/ProviderManager.py (3885c7d255694e659b9ccfa0de93550639b26897)
  • src/lmi/storage/cimom_entry.py (753aa4e9172734eb6caf280619d9d3a9b576daea)

View Diff