Revision 3b3b1bca 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
......
11132 11132
      child.size = parent.size
11133 11133
      child.mode = parent.mode
11134 11134

  
11135
    # this is a DRBD disk, return its port to the pool
11136
    # NOTE: this must be done right before the call to cfg.Update!
11137
    for disk in old_disks:
11138
      tcp_port = disk.logical_id[2]
11139
      self.cfg.AddTcpUdpPort(tcp_port)
11140

  
11135 11141
    # update instance structure
11136 11142
    instance.disks = new_disks
11137 11143
    instance.disk_template = constants.DT_PLAIN
......
11154 11160
        self.LogWarning("Could not remove metadata for disk %d on node %s,"
11155 11161
                        " continuing anyway: %s", idx, pnode, msg)
11156 11162

  
11157
    # this is a DRBD disk, return its port to the pool
11158
    for disk in old_disks:
11159
      tcp_port = disk.logical_id[2]
11160
      self.cfg.AddTcpUdpPort(tcp_port)
11161 11163

  
11162 11164
  def Exec(self, feedback_fn):
11163 11165
    """Modifies an instance.

Also available in: Unified diff