-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard-openlmi.rhcloud.com/r/583/#review717
-----------------------------------------------------------
Nice work! I miss LMI_LUKSStorageExtent, which would represent opened LUKS device (after
luksOpen, new device is created in /dev/mapper/ and in blivet.storagetree).
src/lmi/storage/LMI_ExtentEncryptionConfigurationService.py
<
http://reviewboard-openlmi.rhcloud.com/r/583/#comment401>
You should check that device is not None and throw a nice error if it is.
src/lmi/storage/LMI_ExtentEncryptionConfigurationService.py
<
http://reviewboard-openlmi.rhcloud.com/r/583/#comment402>
you should check that Goal *is* None.
src/lmi/storage/LMI_ExtentEncryptionConfigurationService.py
<
http://reviewboard-openlmi.rhcloud.com/r/583/#comment405>
You can't pass Blivet StorageDevice 'device' here, it may be
removed/reinstatiated before _create_encryption_format() is called, you should pass just
the device name.
src/lmi/storage/LMI_ExtentEncryptionConfigurationService.py
<
http://reviewboard-openlmi.rhcloud.com/r/583/#comment406>
Here you should check that the device name you got from
cim_method_createencryptionformat still exists and report error otherwise.
src/lmi/storage/LMI_ExtentEncryptionConfigurationService.py
<
http://reviewboard-openlmi.rhcloud.com/r/583/#comment410>
this should be done using blivet's ActionCreateFormat (see how ext3 is created in
FilesystemConfigurationService).
src/lmi/storage/LMI_ExtentEncryptionConfigurationService.py
<
http://reviewboard-openlmi.rhcloud.com/r/583/#comment404>
I usually let all blivet exceptions pass through, they are caught by job processor,
which then shows error string from the exception (-> usually stderr of cmdline), which
is sometimes more useful than generic "Can't format LUKS".
src/lmi/storage/LMI_ExtentEncryptionConfigurationService.py
<
http://reviewboard-openlmi.rhcloud.com/r/583/#comment407>
You can use fmtname = provider.get_name_for_format(device, fmt)
src/lmi/storage/LMI_ExtentEncryptionConfigurationService.py
<
http://reviewboard-openlmi.rhcloud.com/r/583/#comment408>
1) This should be asynchronous, i.e. with a job.
2). Use ActionCreateDevice with LUKS device as a parameter.
src/lmi/storage/LMI_ExtentEncryptionConfigurationService.py
<
http://reviewboard-openlmi.rhcloud.com/r/583/#comment411>
Again, this should be asynchronous and with ActionDestroyDevice.
src/lmi/storage/LMI_LUKSFormat.py
<
http://reviewboard-openlmi.rhcloud.com/r/583/#comment409>
You should subclass FormatProvider (and get lot of stuff for free). See
LMI_MDRAIDFormatProvider.
- Jan Safranek
On July 22, 2013, 9:57 a.m., Jan Synacek wrote:
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard-openlmi.rhcloud.com/r/583/
-----------------------------------------------------------
(Updated July 22, 2013, 9:57 a.m.)
Review request for OpenLMI Developers.
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-Luks.mof 3b7ba8e4fd000acdb1cf4232b8ec18120c4a5029
mof/LMI_Storage.reg cf690b166800bd3e4d15da506d86e60777215080
src/lmi/storage/LMI_ExtentEncryptionConfigurationService.py PRE-CREATION
src/lmi/storage/LMI_LUKSFormat.py PRE-CREATION
src/lmi/storage/cimom_entry.py a7c765244cd4fee2308a42c9147c15f1ff07a98f
Diff:
http://reviewboard-openlmi.rhcloud.com/r/583/diff/
Testing
-------
Thanks,
Jan Synacek