Merge branch 'devel-2.4' into stable-2.5
authorMichael Hanselmann <hansmi@google.com>
Mon, 9 Jan 2012 16:09:56 +0000 (17:09 +0100)
committerMichael Hanselmann <hansmi@google.com>
Mon, 9 Jan 2012 16:16:52 +0000 (17:16 +0100)
* devel-2.4:
  Add UnescapeAndSplit unittest for multi-escapes
  Fix a bug in command line option parsing code
  ConfigWriter: Fix epydoc error
  LUGroupAssignNodes: Fix node membership corruption
  Ensure unused ports return to the free port pool
  Re-wrap a paragraph to eliminate a sphinx warning

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

1  2 
lib/cmdlib.py
lib/config.py
lib/utils/text.py
test/ganeti.utils.text_unittest.py

diff --cc lib/cmdlib.py
@@@ -11165,10 -9718,14 +11175,15 @@@ class LUInstanceSetParams(LogicalUnit)
              self.LogWarning("Could not remove disk/%d on node %s: %s,"
                              " continuing anyway", device_idx, node, msg)
          result.append(("disk/%d" % device_idx, "remove"))
+         # if this is a DRBD disk, return its port to the pool
+         if device.dev_type in constants.LDS_DRBD:
+           tcp_port = device.logical_id[2]
+           self.cfg.AddTcpUdpPort(tcp_port)
        elif disk_op == constants.DDM_ADD:
          # add a new disk
 -        if instance.disk_template == constants.DT_FILE:
 +        if instance.disk_template in (constants.DT_FILE,
 +                                        constants.DT_SHARED_FILE):
            file_driver, file_path = instance.disks[0].logical_id
            file_path = os.path.dirname(file_path)
          else:
diff --cc lib/config.py
Simple merge
Simple merge
Simple merge