Fix logic error introduced in assess_status()

Commit 352d699387 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
This commit is contained in:
Frode Nordahl 2018-06-05 18:32:50 +02:00
parent 5c0bef38d3
commit 94b4a52c70
No known key found for this signature in database
GPG Key ID: 6A5D59A3BA48373F
1 changed files with 1 additions and 1 deletions

View File

@ -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')