From: Zack Cerza Date: Wed, 31 Aug 2016 19:44:10 +0000 (-0600) Subject: Add a global switch to disable conserver X-Git-Tag: 1.1.0~537^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=18399224b73e91575941b54ce1849921cbdc7cb4;p=teuthology.git Add a global switch to disable conserver Signed-off-by: Zack Cerza --- diff --git a/docs/siteconfig.rst b/docs/siteconfig.rst index f3886ba781..01f6b59de6 100644 --- a/docs/siteconfig.rst +++ b/docs/siteconfig.rst @@ -222,5 +222,6 @@ Here is a sample configuration with many of the options set and documented:: pcp_host: http://pcp.front.sepia.ceph.com:44323/ # Settings for http://www.conserver.com/ + use_conserver: true conserver_master: conserver.front.sepia.ceph.com conserver_port: 3109 diff --git a/teuthology/config.py b/teuthology/config.py index cb9304b889..e3f537229c 100644 --- a/teuthology/config.py +++ b/teuthology/config.py @@ -137,6 +137,7 @@ class TeuthologyConfig(YamlConfig): 'ceph_git_base_url': 'https://github.com/ceph/', 'ceph_git_url': None, 'ceph_qa_suite_git_url': None, + 'use_conserver': False, 'conserver_master': 'conserver.front.sepia.ceph.com', 'conserver_port': 3109, 'gitbuilder_host': 'gitbuilder.ceph.com', diff --git a/teuthology/orchestra/console.py b/teuthology/orchestra/console.py index f1244091bf..cd7a47171e 100644 --- a/teuthology/orchestra/console.py +++ b/teuthology/orchestra/console.py @@ -43,6 +43,7 @@ class PhysicalConsole(): stdout=subprocess.PIPE, stderr=subprocess.STDOUT).wait() == 0 self.has_conserver = all([ + config.use_conserver is not False, self.conserver_master, self.conserver_port, conserver_client_found, diff --git a/teuthology/orchestra/test/test_console.py b/teuthology/orchestra/test/test_console.py index 248907b021..f308e5a837 100644 --- a/teuthology/orchestra/test/test_console.py +++ b/teuthology/orchestra/test/test_console.py @@ -21,6 +21,7 @@ class TestPhysicalConsole(TestConsole): teuth_config.ipmi_password = 'ipmi_pass' teuth_config.conserver_master = 'conserver_master' teuth_config.conserver_port = 3109 + teuth_config.use_conserver = True def test_has_ipmi_creds(self): cons = self.klass(self.hostname) @@ -191,3 +192,13 @@ class TestPhysicalConsole(TestConsole): assert m_spawn.call_count == 2 assert cons.has_conserver is False assert 'ipmitool' in m_spawn.call_args_list[1][0][0] + + def test_disable_conserver(self): + with patch( + 'teuthology.orchestra.console.subprocess.Popen', + autospec=True, + ) as m_popen: + m_popen.return_value.wait.return_value = 0 + teuth_config.use_conserver = False + cons = self.klass(self.hostname) + assert cons.has_conserver is False