From 94b4a52c70142d5e092a725ce4f95506dff481d8 Mon Sep 17 00:00:00 2001 From: Frode Nordahl Date: Tue, 5 Jun 2018 18:32:50 +0200 Subject: [PATCH] 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 --- hooks/ceph_hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/ceph_hooks.py b/hooks/ceph_hooks.py index 6d2b2ec5..ce2aba9e 100755 --- a/hooks/ceph_hooks.py +++ b/hooks/ceph_hooks.py @@ -610,7 +610,7 @@ def assess_status(): # must have been presented and used for this charm to be operational (prev_status, prev_message) = status_get() running_osds = ceph.get_running_osds() - if prev_status != 'blocked': + if not prev_message.startswith('Non-pristine'): if not running_osds: status_set('blocked', 'No block devices detected using current configuration')