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
Diffs
|