]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Disable version check when ceph-deploy is used to install ceph. 458/head
authorAndrew Schoen <aschoen@redhat.com>
Fri, 27 Mar 2015 17:43:04 +0000 (10:43 -0700)
committerAndrew Schoen <aschoen@redhat.com>
Fri, 27 Mar 2015 18:44:52 +0000 (11:44 -0700)
See: http://tracker.ceph.com/issues/11248

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
teuthology/task/install.py
teuthology/test/task/test_install.py

index a94e32359af764e35b27d1b46e7b67fc272cd6af..6163177ffb3623efde98a510bf7bab194b2916c5 100644 (file)
@@ -488,6 +488,14 @@ def verify_package_version(ctx, config, remote):
     For most cases this is for ceph, but we also install samba
     for example.
     """
+    # Do not verify the version if the ceph-deploy task is being used to
+    # install ceph. Verifying the ceph installed by ceph-deploy should work,
+    # but the qa suites will need reorganized first to run ceph-deploy
+    # before the install task.
+    # see: http://tracker.ceph.com/issues/11248
+    if config.get("extras"):
+        log.info("Skipping version verification...")
+        return True
     base_url = _get_baseurl(ctx, remote, config)
     version = _block_looking_for_package_version(
         remote,
index 4bcccceb37691c15501c9f45450c5aafacff0756..9233554f58ea79c6ef0d584e32106156de51e440 100644 (file)
@@ -23,5 +23,20 @@ class TestInstall(object):
                                         m_get_baseurl):
         m_block.return_value = "0.89.0"
         m_get_package_version.return_value = "0.89.1"
+        config = Mock()
+        # when it looks for config.get('extras') it won't find it
+        config.get.return_value = False
         with pytest.raises(RuntimeError):
-            install.verify_package_version(Mock(), Mock(), Mock())
+            install.verify_package_version(Mock(), config, Mock())
+
+    @patch("teuthology.task.install._get_baseurl")
+    @patch("teuthology.task.install._block_looking_for_package_version")
+    @patch("teuthology.task.install.packaging.get_package_version")
+    def test_skip_when_using_ceph_deploy(self, m_get_package_version, m_block,
+                                         m_get_baseurl):
+        m_block.return_value = "0.89.0"
+        # ceph isn't installed because ceph-deploy would install it
+        m_get_package_version.return_value = None
+        config = Mock()
+        config.extras = True
+        install.verify_package_version(Mock(), config, Mock())