Revision cd3b4ff4 lib/config.py
b/lib/config.py | ||
---|---|---|
891 | 891 |
|
892 | 892 |
if disk.logical_id is None and disk.physical_id is not None: |
893 | 893 |
return |
894 |
if disk.dev_type == constants.LD_DRBD8:
|
|
894 |
if disk.dev_type == constants.DT_DRBD8:
|
|
895 | 895 |
pnode, snode, port, pminor, sminor, secret = disk.logical_id |
896 | 896 |
if node_uuid not in (pnode, snode): |
897 | 897 |
raise errors.ConfigurationError("DRBD device not knowing node %s" % |
... | ... | |
981 | 981 |
""" |
982 | 982 |
def _AppendUsedMinors(get_node_name_fn, instance, disk, used): |
983 | 983 |
duplicates = [] |
984 |
if disk.dev_type == constants.LD_DRBD8 and len(disk.logical_id) >= 5:
|
|
984 |
if disk.dev_type == constants.DT_DRBD8 and len(disk.logical_id) >= 5:
|
|
985 | 985 |
node_a, node_b, _, minor_a, minor_b = disk.logical_id[:5] |
986 | 986 |
for node_uuid, minor in ((node_a, minor_a), (node_b, minor_b)): |
987 | 987 |
assert node_uuid in used, \ |
... | ... | |
1570 | 1570 |
inst.name = new_name |
1571 | 1571 |
|
1572 | 1572 |
for (idx, disk) in enumerate(inst.disks): |
1573 |
if disk.dev_type == constants.LD_FILE:
|
|
1573 |
if disk.dev_type in [constants.DT_FILE, constants.DT_SHARED_FILE]:
|
|
1574 | 1574 |
# rename the file paths in logical and physical id |
1575 | 1575 |
file_storage_dir = os.path.dirname(os.path.dirname(disk.logical_id[1])) |
1576 | 1576 |
disk.logical_id = (disk.logical_id[0], |
Also available in: Unified diff