From 7b7dc7ec55320fcc88f422ebd5d8d956a7d04f3a Mon Sep 17 00:00:00 2001 From: Frode Nordahl Date: Thu, 28 Mar 2019 17:25:46 +0100 Subject: [PATCH 1/3] charm_tests/ceph/rbd_mirror: Workaround upstream Ceph Luminous bug Fixes #208 --- zaza/charm_tests/ceph/rbd_mirror/tests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zaza/charm_tests/ceph/rbd_mirror/tests.py b/zaza/charm_tests/ceph/rbd_mirror/tests.py index 1c03ba4..8b94db5 100644 --- a/zaza/charm_tests/ceph/rbd_mirror/tests.py +++ b/zaza/charm_tests/ceph/rbd_mirror/tests.py @@ -97,7 +97,9 @@ class CephRBDMirrorBase(test_utils.OpenStackBaseTest): break if check_entries_behind_master: m = rep.match(image['description']) - if m and m.group(1) != '0': + # NOTE(fnordahl): Tactical fix for upstream Ceph + # Luminous bug https://tracker.ceph.com/issues/23516 + if m and int(m.group(1)) > 42: logging.info('entries_behind_master={}' .format(m.group(1))) break From b03a97a14d8b9ae0fd0a86d24b16ce2372a05f0b Mon Sep 17 00:00:00 2001 From: Frode Nordahl Date: Fri, 29 Mar 2019 07:05:06 +0100 Subject: [PATCH 2/3] charm_tests/ceph/rbd_mirror: Use sorted list of pool names At present the test uses a dict which includes the internal numeric ID each pool has. This may be different on each side depending on which order the pools were created in. Use pool name in a sorted list for comparison instead. --- zaza/charm_tests/ceph/rbd_mirror/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zaza/charm_tests/ceph/rbd_mirror/tests.py b/zaza/charm_tests/ceph/rbd_mirror/tests.py index 8b94db5..a90dd50 100644 --- a/zaza/charm_tests/ceph/rbd_mirror/tests.py +++ b/zaza/charm_tests/ceph/rbd_mirror/tests.py @@ -52,7 +52,7 @@ class CephRBDMirrorBase(test_utils.OpenStackBaseTest): def get_pools(self): """Retrieve list of pools from both sites. - :returns: Tuple with two dicts representing the pools on each side. + :returns: Tuple with list of pools on each side. :rtype: tuple """ site_a_pools = zaza.utilities.ceph.get_ceph_pools( @@ -64,7 +64,7 @@ class CephRBDMirrorBase(test_utils.OpenStackBaseTest): 'ceph-mon' + self.site_b_app_suffix, model_name=self.site_b_model), model_name=self.site_b_model) - return site_a_pools, site_b_pools + return sorted(site_a_pools.keys()), sorted(site_b_pools.keys()) def wait_for_mirror_state(self, state, application_name=None, model_name=None, From 089d284b3e84529d8d25893043c9ae8160664dbc Mon Sep 17 00:00:00 2001 From: Frode Nordahl Date: Fri, 29 Mar 2019 08:29:08 +0100 Subject: [PATCH 3/3] travis: Enable debug logging for juju bootstrap The functional tests are consistently timing out atm in the juju bootstrap stage. Enable debug log so we can se what is going on. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index df1e8ba..a2d4951 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,9 +18,10 @@ script: sudo snap install juju --classic; sudo sh -c 'echo PATH=/snap/bin:$PATH >> /etc/environment'; sudo lxd waitready; + sudo journalctl --no-pager -xe; sudo lxd init --auto; sudo usermod -a -G lxd travis; - sudo su travis -c 'juju bootstrap --no-gui localhost'; + sudo su travis -c 'juju bootstrap --debug --no-gui localhost'; fi - tox -c tox.ini -e $ENV - if [ $ENV = 'func-travis' ]; then