On 30 January 2013 13:08, Michael Hanselmann <[email protected]> wrote: > 2013/1/30 Bernardo Dal Seno <[email protected]>: >> + # 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) >> + # FIXME: This test leaves a DRBD device and two LVs behind >> + # Cluster-verify would fail > > This is indeed not good. Tests should, with some exceptions like > creating instances, be idempotent and leave the cluster in the same > state as it was before (otherwise ordering and/or configuration of > tests can cause/hide problems).
I agree, but, if it wasn't clear, I didn't do anything with this test, I just discovered the problem when I added a couple of cluster-verify. So I moved it at the end. > Is there a chance for you to fix this in a separate patch? Well, I can look into it. Bernardo
