]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Add a global switch to disable conserver 941/head
authorZack Cerza <zack@redhat.com>
Wed, 31 Aug 2016 19:44:10 +0000 (13:44 -0600)
committerZack Cerza <zack@redhat.com>
Wed, 31 Aug 2016 21:18:57 +0000 (15:18 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
docs/siteconfig.rst
teuthology/config.py
teuthology/orchestra/console.py
teuthology/orchestra/test/test_console.py

index f3886ba781305ca6db686f40d6ea57fd8d0f4d22..01f6b59de61b4e8e053b8a1b9776e9c0018639ab 100644 (file)
@@ -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
index cb9304b8899a5f47ab5e69b4d33100df38a84b6b..e3f537229ce9585501d843b5c92f6537fdc8f356 100644 (file)
@@ -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',
index f1244091bf66d8fa4bbb9ece581f83bf4bbf76ab..cd7a47171e7ac28cf1e3f3800635977ecce445df 100644 (file)
@@ -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,
index 248907b021fd9817d18012a7d4a92c8be95d4e41..f308e5a83703b52952b70791ef0410fa94df54e3 100644 (file)
@@ -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