Revision 59726e15 lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
2424 | 2424 |
constants.MIN_VG_SIZE) |
2425 | 2425 |
_ErrorIf(vgstatus, constants.CV_ENODELVM, node, vgstatus) |
2426 | 2426 |
|
2427 |
# check pv names |
|
2428 |
pvlist = nresult.get(constants.NV_PVLIST, None) |
|
2429 |
test = pvlist is None |
|
2427 |
# check pv names (and possibly sizes)
|
|
2428 |
pvlist_dict = nresult.get(constants.NV_PVLIST, None)
|
|
2429 |
test = pvlist_dict is None
|
|
2430 | 2430 |
_ErrorIf(test, constants.CV_ENODELVM, node, "Can't get PV list from node") |
2431 | 2431 |
if not test: |
2432 |
pvlist = map(objects.LvmPvInfo.FromDict, pvlist_dict) |
|
2432 | 2433 |
# check that ':' is not present in PV names, since it's a |
2433 | 2434 |
# special character for lvcreate (denotes the range of PEs to |
2434 | 2435 |
# use on the PV) |
2435 |
for _, pvname, owner_vg in pvlist:
|
|
2436 |
test = ":" in pvname |
|
2436 |
for pv in pvlist:
|
|
2437 |
test = ":" in pv.name
|
|
2437 | 2438 |
_ErrorIf(test, constants.CV_ENODELVM, node, |
2438 | 2439 |
"Invalid character ':' in PV '%s' of VG '%s'", |
2439 |
pvname, owner_vg)
|
|
2440 |
pv.name, pv.vg_name)
|
|
2440 | 2441 |
|
2441 | 2442 |
def _VerifyNodeBridges(self, ninfo, nresult, bridges): |
2442 | 2443 |
"""Check the node bridges. |
Also available in: Unified diff