summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrode Nordahl <frode.nordahl@canonical.com>2018-06-05 18:32:50 +0200
committerFrode Nordahl <frode.nordahl@canonical.com>2018-06-05 18:32:50 +0200
commit94b4a52c70142d5e092a725ce4f95506dff481d8 (patch)
treec966b7006ae76931f713f47d2611e0695670ded8
parent5c0bef38d3051d4244f50c756998f3d258b4b57b (diff)
Fix logic error introduced in assess_status()
Commit 352d6993870be2547f37463e4e3cffc7605f749c introduced a change in assess_status to not update status as long as the previous status was 'blocked'. This was done because the check for pristine block devices is done elsewhere in the charm. However there are other situations that might set the charm in 'blocked' state. This commit addresses this error. Change-Id: Icdc272dadd7f9ceb670d37238628d31f33d11770
Notes
Notes (review): Verified+1: Canonical CI <uosci-testing-bot@ubuntu.com> Code-Review+2: David Ames <david.ames@canonical.com> Workflow+1: David Ames <david.ames@canonical.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 05 Jun 2018 18:04:57 +0000 Reviewed-on: https://review.openstack.org/572461 Project: openstack/charm-ceph-osd Branch: refs/heads/master
-rwxr-xr-xhooks/ceph_hooks.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/hooks/ceph_hooks.py b/hooks/ceph_hooks.py
index 6d2b2ec..ce2aba9 100755
--- a/hooks/ceph_hooks.py
+++ b/hooks/ceph_hooks.py
@@ -610,7 +610,7 @@ def assess_status():
610 # must have been presented and used for this charm to be operational 610 # must have been presented and used for this charm to be operational
611 (prev_status, prev_message) = status_get() 611 (prev_status, prev_message) = status_get()
612 running_osds = ceph.get_running_osds() 612 running_osds = ceph.get_running_osds()
613 if prev_status != 'blocked': 613 if not prev_message.startswith('Non-pristine'):
614 if not running_osds: 614 if not running_osds:
615 status_set('blocked', 615 status_set('blocked',
616 'No block devices detected using current configuration') 616 'No block devices detected using current configuration')