6896 |
6896 |
" continuing anyway: %s", device.iv_name, node, msg)
|
6897 |
6897 |
all_result = False
|
6898 |
6898 |
|
|
6899 |
# if this is a DRBD disk, return its port to the pool
|
|
6900 |
if device.dev_type in constants.LDS_DRBD:
|
|
6901 |
tcp_port = device.logical_id[2]
|
|
6902 |
lu.cfg.AddTcpUdpPort(tcp_port)
|
|
6903 |
|
6899 |
6904 |
if instance.disk_template == constants.DT_FILE:
|
6900 |
6905 |
file_storage_dir = os.path.dirname(instance.disks[0].logical_id[1])
|
6901 |
6906 |
if target_node:
|
... | ... | |
9682 |
9687 |
self.LogWarning("Could not remove metadata for disk %d on node %s,"
|
9683 |
9688 |
" continuing anyway: %s", idx, pnode, msg)
|
9684 |
9689 |
|
|
9690 |
# this is a DRBD disk, return its port to the pool
|
|
9691 |
for disk in old_disks:
|
|
9692 |
tcp_port = disk.logical_id[2]
|
|
9693 |
self.cfg.AddTcpUdpPort(tcp_port)
|
|
9694 |
|
9685 |
9695 |
def Exec(self, feedback_fn):
|
9686 |
9696 |
"""Modifies an instance.
|
9687 |
9697 |
|
... | ... | |
9708 |
9718 |
self.LogWarning("Could not remove disk/%d on node %s: %s,"
|
9709 |
9719 |
" continuing anyway", device_idx, node, msg)
|
9710 |
9720 |
result.append(("disk/%d" % device_idx, "remove"))
|
|
9721 |
|
|
9722 |
# if this is a DRBD disk, return its port to the pool
|
|
9723 |
if device.dev_type in constants.LDS_DRBD:
|
|
9724 |
tcp_port = device.logical_id[2]
|
|
9725 |
self.cfg.AddTcpUdpPort(tcp_port)
|
9711 |
9726 |
elif disk_op == constants.DDM_ADD:
|
9712 |
9727 |
# add a new disk
|
9713 |
9728 |
if instance.disk_template == constants.DT_FILE:
|