Revision 376631d1 lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
8849 | 8849 |
self._GoReconnect(False) |
8850 | 8850 |
self._WaitUntilSync() |
8851 | 8851 |
|
8852 |
# If the instance's disk template is `rbd' and there was a successful
|
|
8853 |
# migration, unmap the device from the source node. |
|
8854 |
if self.instance.disk_template == constants.DT_RBD:
|
|
8852 |
# If the instance's disk template is `rbd' or `ext' and there was a
|
|
8853 |
# successful migration, unmap the device from the source node.
|
|
8854 |
if self.instance.disk_template in (constants.DT_RBD, constants.DT_EXT):
|
|
8855 | 8855 |
disks = _ExpandCheckDisks(instance, instance.disks) |
8856 | 8856 |
self.feedback_fn("* unmapping instance's disks from %s" % source_node) |
8857 | 8857 |
for disk in disks: |
... | ... | |
9101 | 9101 |
_DISK_TEMPLATE_NAME_PREFIX = { |
9102 | 9102 |
constants.DT_PLAIN: "", |
9103 | 9103 |
constants.DT_RBD: ".rbd", |
9104 |
constants.DT_EXT: ".ext", |
|
9104 | 9105 |
} |
9105 | 9106 |
|
9106 | 9107 |
|
... | ... | |
9110 | 9111 |
constants.DT_SHARED_FILE: constants.LD_FILE, |
9111 | 9112 |
constants.DT_BLOCK: constants.LD_BLOCKDEV, |
9112 | 9113 |
constants.DT_RBD: constants.LD_RBD, |
9114 |
constants.DT_EXT: constants.LD_EXT, |
|
9113 | 9115 |
} |
9114 | 9116 |
|
9115 | 9117 |
|
... | ... | |
9189 | 9191 |
disk[constants.IDISK_ADOPT]) |
9190 | 9192 |
elif template_name == constants.DT_RBD: |
9191 | 9193 |
logical_id_fn = lambda idx, _, disk: ("rbd", names[idx]) |
9194 |
elif template_name == constants.DT_EXT: |
|
9195 |
logical_id_fn = lambda idx, _, disk: ("ext", names[idx]) |
|
9192 | 9196 |
else: |
9193 | 9197 |
raise errors.ProgrammerError("Unknown disk template '%s'" % template_name) |
9194 | 9198 |
|
... | ... | |
10433 | 10437 |
# Any function that checks prerequisites can be placed here. |
10434 | 10438 |
# Check if there is enough space on the RADOS cluster. |
10435 | 10439 |
_CheckRADOSFreeSpace() |
10440 |
elif self.op.disk_template == constants.DT_EXT: |
|
10441 |
# FIXME: Function that checks prereqs if needed |
|
10442 |
pass |
|
10436 | 10443 |
else: |
10437 | 10444 |
# Check lv size requirements, if not adopting |
10438 | 10445 |
req_sizes = _ComputeDiskSizePerVG(self.op.disk_template, self.disks) |
... | ... | |
12318 | 12325 |
|
12319 | 12326 |
if instance.disk_template not in (constants.DT_FILE, |
12320 | 12327 |
constants.DT_SHARED_FILE, |
12321 |
constants.DT_RBD): |
|
12328 |
constants.DT_RBD, |
|
12329 |
constants.DT_EXT): |
|
12322 | 12330 |
# TODO: check the free disk space for file, when that feature will be |
12323 | 12331 |
# supported |
12324 | 12332 |
_CheckNodesFreeDiskPerVG(self, nodenames, |
Also available in: Unified diff