Commit e4889779 authored by Thomas Thrainer's avatar Thomas Thrainer

Revert "Disable failing QA test"

This reverts commit b2525349.

Issue 516 was fixed, so now the QA test can be re-enabled again.
Signed-off-by: default avatarThomas Thrainer <thomasth@google.com>
Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
parent 8f8442d6
......@@ -33,6 +33,7 @@ from ganeti import utils
from ganeti import pathutils
import qa_config
import qa_daemon
import qa_utils
import qa_error
import qa_instance
......@@ -349,46 +350,42 @@ def TestClusterVerify():
AssertCommand(["gnt-cluster", "verify-disks"])
# pylint: disable=W0613
def TestClusterVerifyDisksBrokenDRBD(instance, inst_nodes):
"""gnt-cluster verify-disks with broken DRBD"""
pass
qa_daemon.TestPauseWatcher()
# FIXME (thomasth): reenable once it works (see issue 516!)
# qa_daemon.TestPauseWatcher()
#
# try:
# info = qa_instance.GetInstanceInfo(instance.name)
# snode = inst_nodes[1]
# for idx, minor in enumerate(info["drbd-minors"][snode.primary]):
# if idx % 2 == 0:
# break_drbd_cmd = \
# "(drbdsetup %d down >/dev/null 2>&1;" \
# " drbdsetup down resource%d >/dev/null 2>&1) || /bin/true" % \
# (minor, minor)
# else:
# break_drbd_cmd = \
# "(drbdsetup %d detach >/dev/null 2>&1;" \
# " drbdsetup detach %d >/dev/null 2>&1) || /bin/true" % \
# (minor, minor)
# AssertCommand(break_drbd_cmd, node=snode)
#
# verify_output = GetCommandOutput(qa_config.GetMasterNode().primary,
# "gnt-cluster verify-disks")
# activation_msg = "Activating disks for instance '%s'" % instance.name
# if activation_msg not in verify_output:
# raise qa_error.Error("gnt-cluster verify-disks did not activate broken"
# " DRBD disks:\n%s" % verify_output)
#
# verify_output = GetCommandOutput(qa_config.GetMasterNode().primary,
# "gnt-cluster verify-disks")
# if activation_msg in verify_output:
# raise qa_error.Error("gnt-cluster verify-disks wants to activate broken"
# " DRBD disks on second attempt:\n%s" % verify_output)
#
# AssertCommand(_CLUSTER_VERIFY)
# finally:
# qa_daemon.TestResumeWatcher()
try:
info = qa_instance.GetInstanceInfo(instance.name)
snode = inst_nodes[1]
for idx, minor in enumerate(info["drbd-minors"][snode.primary]):
if idx % 2 == 0:
break_drbd_cmd = \
"(drbdsetup %d down >/dev/null 2>&1;" \
" drbdsetup down resource%d >/dev/null 2>&1) || /bin/true" % \
(minor, minor)
else:
break_drbd_cmd = \
"(drbdsetup %d detach >/dev/null 2>&1;" \
" drbdsetup detach %d >/dev/null 2>&1) || /bin/true" % \
(minor, minor)
AssertCommand(break_drbd_cmd, node=snode)
verify_output = GetCommandOutput(qa_config.GetMasterNode().primary,
"gnt-cluster verify-disks")
activation_msg = "Activating disks for instance '%s'" % instance.name
if activation_msg not in verify_output:
raise qa_error.Error("gnt-cluster verify-disks did not activate broken"
" DRBD disks:\n%s" % verify_output)
verify_output = GetCommandOutput(qa_config.GetMasterNode().primary,
"gnt-cluster verify-disks")
if activation_msg in verify_output:
raise qa_error.Error("gnt-cluster verify-disks wants to activate broken"
" DRBD disks on second attempt:\n%s" % verify_output)
AssertCommand(_CLUSTER_VERIFY)
finally:
qa_daemon.TestResumeWatcher()
def TestJobqueue():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment