Revision e687ec01 lib/bdev.py
b/lib/bdev.py | ||
---|---|---|
321 | 321 |
is_degraded=is_degraded, |
322 | 322 |
ldisk_status=ldisk_status) |
323 | 323 |
|
324 |
|
|
325 | 324 |
def SetInfo(self, text): |
326 | 325 |
"""Update metadata with info text. |
327 | 326 |
|
... | ... | |
408 | 407 |
pvs_info.sort() |
409 | 408 |
pvs_info.reverse() |
410 | 409 |
|
411 |
pvlist = [ pv[1] for pv in pvs_info ]
|
|
410 |
pvlist = [pv[1] for pv in pvs_info]
|
|
412 | 411 |
if compat.any(":" in v for v in pvlist): |
413 | 412 |
_ThrowError("Some of your PVs have the invalid character ':' in their" |
414 | 413 |
" name, this is not supported - please filter them out" |
415 | 414 |
" in lvm.conf using either 'filter' or 'preferred_names'") |
416 |
free_size = sum([ pv[0] for pv in pvs_info ])
|
|
415 |
free_size = sum([pv[0] for pv in pvs_info])
|
|
417 | 416 |
current_pvs = len(pvlist) |
418 | 417 |
stripes = min(current_pvs, constants.LVM_STRIPECOUNT) |
419 | 418 |
|
... | ... | |
1113 | 1112 |
super(DRBD8, self).__init__(unique_id, children, size) |
1114 | 1113 |
self.major = self._DRBD_MAJOR |
1115 | 1114 |
version = self._GetVersion(self._GetProcData()) |
1116 |
if version["k_major"] != 8 :
|
|
1115 |
if version["k_major"] != 8: |
|
1117 | 1116 |
_ThrowError("Mismatch in DRBD kernel version and requested ganeti" |
1118 | 1117 |
" usage: kernel is %s.%s, ganeti wants 8.x", |
1119 | 1118 |
version["k_major"], version["k_minor"]) |
... | ... | |
1194 | 1193 |
# this also converts the value to an int |
1195 | 1194 |
number = pyp.Word(pyp.nums).setParseAction(lambda s, l, t: int(t[0])) |
1196 | 1195 |
|
1197 |
comment = pyp.Literal ("#") + pyp.Optional(pyp.restOfLine)
|
|
1196 |
comment = pyp.Literal("#") + pyp.Optional(pyp.restOfLine) |
|
1198 | 1197 |
defa = pyp.Literal("_is_default").suppress() |
1199 | 1198 |
dbl_quote = pyp.Literal('"').suppress() |
1200 | 1199 |
|
Also available in: Unified diff