Bug 1126765

Summary: lvm.create_vg() throws a traceback
Product: [Fedora] Fedora Reporter: Jan Safranek <jsafrane>
Component: openlmi-storageAssignee: Jan Safranek <jsafrane>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 21CC: agk, jsafrane, jsynacek, tsmetana
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-04 15:15:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Safranek 2014-08-05 08:40:26 UTC
Following script fails with a traceback on clean Fedora 20 installation:

c = connect("localhost")
ns = c.root.cimv2
import lmi.scripts.storage.lvm as lvm
lvm.create_vg(ns, ['/dev/vdb1'], 'testVg1')

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/lmi/scripts/storage/lvm.py", line 201, in create_vg
    % (values.value_name(ret),))
  File "/usr/lib/python2.7/site-packages/lmi/shell/LMIConstantValues.py", line 137, in value_name
    return self._value_map_inv[value]
KeyError: None


Version-Release number of selected component (if applicable):
openlmi-scripts-storage-0.3.0-1.fc20.noarch


The reason is that 'ret' is None, while 'err' is set.

Comment 1 Jan Safranek 2014-08-05 08:51:57 UTC
Patch sent upstream: https://github.com/openlmi/openlmi-scripts/pull/95

Comment 2 Jan Safranek 2014-11-04 15:15:07 UTC
Fixed in 0.3.0 (and also probably earlier, sorry for not updating the bug).