From: Andrew Schoen Date: Fri, 27 Mar 2015 17:43:04 +0000 (-0700) Subject: Disable version check when ceph-deploy is used to install ceph. X-Git-Tag: 1.1.0~978^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F458%2Fhead;p=teuthology.git Disable version check when ceph-deploy is used to install ceph. See: http://tracker.ceph.com/issues/11248 Signed-off-by: Andrew Schoen --- diff --git a/teuthology/task/install.py b/teuthology/task/install.py index a94e32359..6163177ff 100644 --- a/teuthology/task/install.py +++ b/teuthology/task/install.py @@ -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, diff --git a/teuthology/test/task/test_install.py b/teuthology/test/task/test_install.py index 4bcccceb3..9233554f5 100644 --- a/teuthology/test/task/test_install.py +++ b/teuthology/test/task/test_install.py @@ -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())