+ finally:
+ qa_config.ReleaseNode(pnode)
+
+ # Test removing instance with offline drbd secondary
+ if qa_config.TestEnabled("instance-remove-drbd-offline"):
+ # Make sure the master is not put offline
+ snode = qa_config.AcquireNode(exclude=qa_config.GetMasterNode())
+ try:
+ pnode = qa_config.AcquireNode(exclude=snode)
+ try:
+ instance = qa_instance.TestInstanceAddWithDrbdDisk(pnode, snode)
+ qa_node.MakeNodeOffline(snode, "yes")
+ try:
+ RunTest(qa_instance.TestInstanceRemove, instance)
+ finally:
+ qa_node.MakeNodeOffline(snode, "no")
+ finally:
+ qa_config.ReleaseNode(pnode)
+ finally:
+ qa_config.ReleaseNode(snode)
+
+ pnode = qa_config.AcquireNode()
+ try: