From afdd9a974d630abdcea87f0b048d56c1bd4bb7ea Mon Sep 17 00:00:00 2001 From: Nicolas Pochet Date: Fri, 20 Jul 2018 09:02:49 +0200 Subject: [PATCH] Remove reference to ntp package This is motivated by the fact that: * the ntp/chrony package is already a dependency of the ceph-mon/osd package * NTP will be managed by operators through the NTP charm It is thus useless to keep that package mentioned here. Change-Id: Iddb7ffcc7ab7a74700855b950f619208511c2fab Closes-Bug: #1780690 --- ceph/utils.py | 6 +----- unit_tests/test_utils.py | 8 +------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/ceph/utils.py b/ceph/utils.py index 6d039cd..15f54ef 100644 --- a/ceph/utils.py +++ b/ceph/utils.py @@ -40,7 +40,6 @@ from charmhelpers.core.host import ( service_start, service_stop, CompareHostReleases, - is_container, ) from charmhelpers.core.hookenv import ( cached, @@ -81,7 +80,7 @@ LEADER = 'leader' PEON = 'peon' QUORUM = [LEADER, PEON] -PACKAGES = ['ceph', 'gdisk', 'ntp', 'btrfs-tools', 'python-ceph', +PACKAGES = ['ceph', 'gdisk', 'btrfs-tools', 'python-ceph', 'radosgw', 'xfsprogs', 'python-pyudev', 'lvm2', 'parted'] @@ -2643,9 +2642,6 @@ def determine_packages(): :returns: list of ceph packages """ - if is_container(): - PACKAGES.remove('ntp') - return PACKAGES diff --git a/unit_tests/test_utils.py b/unit_tests/test_utils.py index b0bdd0e..eafdd00 100644 --- a/unit_tests/test_utils.py +++ b/unit_tests/test_utils.py @@ -460,16 +460,10 @@ class CephTestCase(unittest.TestCase): mock_reweight.assert_called_once_with( ['ceph', 'osd', 'crush', 'reweight', 'osd.0', '1'], stderr=-2) - @patch.object(utils, 'is_container') - def test_determine_packages(self, mock_is_container): - mock_is_container.return_value = False - self.assertTrue('ntp' in utils.determine_packages()) + def test_determine_packages(self): self.assertEqual(utils.PACKAGES, utils.determine_packages()) - mock_is_container.return_value = True - self.assertFalse('ntp' in utils.determine_packages()) - @patch.object(utils, 'chownr') @patch.object(utils, 'cmp_pkgrevno') @patch.object(utils, 'ceph_user')