Revision a36f690c

b/qa/ganeti-qa.py
514 514
  finally:
515 515
    qa_config.ReleaseNode(pnode)
516 516

  
517
  # Make sure the cluster is clean before running instance tests
518
  qa_cluster.AssertClusterVerify()
519

  
517 520
  pnode = qa_config.AcquireNode()
518 521
  try:
519 522
    RunTestIf("tags", qa_tags.TestNodeTags, pnode)
......
568 571
        del instance
569 572
      finally:
570 573
        qa_config.ReleaseManyNodes(inodes)
571

  
572
  # Test removing instance with offline drbd secondary
573
  if qa_config.TestEnabled("instance-remove-drbd-offline"):
574
    # Make sure the master is not put offline
575
    snode = qa_config.AcquireNode(exclude=qa_config.GetMasterNode())
576
    try:
577
      pnode = qa_config.AcquireNode(exclude=snode)
578
      try:
579
        instance = qa_instance.TestInstanceAddWithDrbdDisk([pnode, snode])
580
        qa_node.MakeNodeOffline(snode, "yes")
581
        try:
582
          RunTest(qa_instance.TestInstanceRemove, instance)
583
        finally:
584
          qa_node.MakeNodeOffline(snode, "no")
585
      finally:
586
        qa_config.ReleaseNode(pnode)
587
    finally:
588
      qa_config.ReleaseNode(snode)
574
      qa_cluster.AssertClusterVerify()
589 575

  
590 576
  pnode = qa_config.AcquireNode()
591 577
  try:
......
603 589
          qa_config.ReleaseNode(expnode)
604 590
        del expnode
605 591
        del instance
592
      qa_cluster.AssertClusterVerify()
606 593

  
607 594
  finally:
608 595
    qa_config.ReleaseNode(pnode)
609 596

  
610 597
  RunExclusiveStorageTests()
611 598

  
599
  # Test removing instance with offline drbd secondary
600
  if qa_config.TestEnabled("instance-remove-drbd-offline"):
601
    # Make sure the master is not put offline
602
    snode = qa_config.AcquireNode(exclude=qa_config.GetMasterNode())
603
    try:
604
      pnode = qa_config.AcquireNode(exclude=snode)
605
      try:
606
        instance = qa_instance.TestInstanceAddWithDrbdDisk([pnode, snode])
607
        qa_node.MakeNodeOffline(snode, "yes")
608
        try:
609
          RunTest(qa_instance.TestInstanceRemove, instance)
610
        finally:
611
          qa_node.MakeNodeOffline(snode, "no")
612
      finally:
613
        qa_config.ReleaseNode(pnode)
614
    finally:
615
      qa_config.ReleaseNode(snode)
616
    # FIXME: This test leaves a DRBD device and two LVs behind
617
    # Cluster-verify would fail
618

  
612 619
  RunTestIf("create-cluster", qa_node.TestNodeRemoveAll)
613 620

  
614 621
  RunTestIf("cluster-destroy", qa_cluster.TestClusterDestroy)

Also available in: Unified diff