diff --git a/qa/ganeti-qa.py b/qa/ganeti-qa.py index ed56dec97c3aad4680058de77d0727718f27a13e..3d61634146e8471f96cbe1d3454f3d8112b22850 100755 --- a/qa/ganeti-qa.py +++ b/qa/ganeti-qa.py @@ -164,6 +164,7 @@ def RunClusterTests(): ("cluster-command", qa_cluster.TestClusterCommand), ("cluster-burnin", qa_cluster.TestClusterBurnin), ("cluster-master-failover", qa_cluster.TestClusterMasterFailover), + ("cluster-oob", qa_cluster.TestClusterOob), ("rapi", qa_rapi.TestVersion), ("rapi", qa_rapi.TestEmptyCluster), ]: diff --git a/qa/qa_cluster.py b/qa/qa_cluster.py index 89159a72cd1b0a1b73f680d65c9a0d36cafa87a5..296f7c76379a4d5f8e4e98415c973eb78704faa7 100644 --- a/qa/qa_cluster.py +++ b/qa/qa_cluster.py @@ -1,7 +1,7 @@ # # -# Copyright (C) 2007, 2010 Google Inc. +# Copyright (C) 2007, 2010, 2011 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -118,8 +118,8 @@ def TestClusterRename(): AssertCommand(data) -def TestClusterVerify(): - """gnt-cluster verify""" +def TestClusterOob(): + """out-of-band framework""" oob_path_exists = "/tmp/ganeti-qa-oob-does-exist-%s" % utils.NewUUID() AssertCommand(["gnt-cluster", "verify"]) @@ -129,10 +129,9 @@ def TestClusterVerify(): AssertCommand(["gnt-cluster", "verify"], fail=True) - for node in qa_config.get("nodes"): - node_name = node["primary"] - remote_file = qa_utils.UploadData(node_name, "", mode=0400) - AssertCommand(["mv", remote_file, oob_path_exists], node=node_name) + AssertCommand(["touch", oob_path_exists]) + AssertCommand(["chmod", "0400", oob_path_exists]) + AssertCommand(["gnt-cluster", "copyfile", oob_path_exists]) try: AssertCommand(["gnt-cluster", "modify", "--node-parameters", @@ -140,18 +139,19 @@ def TestClusterVerify(): AssertCommand(["gnt-cluster", "verify"], fail=True) - for node in qa_config.get("nodes"): - node_name = node["primary"] - AssertCommand(["chmod", "0500", oob_path_exists], node=node_name) + AssertCommand(["chmod", "0500", oob_path_exists]) + AssertCommand(["gnt-cluster", "copyfile", oob_path_exists]) AssertCommand(["gnt-cluster", "verify"]) finally: - for node in qa_config.get("nodes"): - node_name = node["primary"] - AssertCommand(["rm", oob_path_exists], node=node_name) + AssertCommand(["gnt-cluster", "command", "rm", oob_path_exists]) AssertCommand(["gnt-cluster", "modify", "--node-parameters", "oob_program="]) + + +def TestClusterVerify(): + """gnt-cluster verify""" AssertCommand(["gnt-cluster", "verify"])