Revision 2522b7c4 lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
1 | 1 |
# |
2 | 2 |
# |
3 | 3 |
|
4 |
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Google Inc. |
|
4 |
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Google Inc.
|
|
5 | 5 |
# |
6 | 6 |
# This program is free software; you can redistribute it and/or modify |
7 | 7 |
# it under the terms of the GNU General Public License as published by |
... | ... | |
9665 | 9665 |
child.size = parent.size |
9666 | 9666 |
child.mode = parent.mode |
9667 | 9667 |
|
9668 |
# this is a DRBD disk, return its port to the pool |
|
9669 |
# NOTE: this must be done right before the call to cfg.Update! |
|
9670 |
for disk in old_disks: |
|
9671 |
tcp_port = disk.logical_id[2] |
|
9672 |
self.cfg.AddTcpUdpPort(tcp_port) |
|
9673 |
|
|
9668 | 9674 |
# update instance structure |
9669 | 9675 |
instance.disks = new_disks |
9670 | 9676 |
instance.disk_template = constants.DT_PLAIN |
... | ... | |
9687 | 9693 |
self.LogWarning("Could not remove metadata for disk %d on node %s," |
9688 | 9694 |
" continuing anyway: %s", idx, pnode, msg) |
9689 | 9695 |
|
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 | 9696 |
|
9695 | 9697 |
def Exec(self, feedback_fn): |
9696 | 9698 |
"""Modifies an instance. |
Also available in: Unified diff