Browse Source

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
Frode Nordahl 10 months ago
parent
commit
94b4a52c70
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      hooks/ceph_hooks.py

+ 1
- 1
hooks/ceph_hooks.py View File

@@ -610,7 +610,7 @@ def assess_status():
610 610
     # must have been presented and used for this charm to be operational
611 611
     (prev_status, prev_message) = status_get()
612 612
     running_osds = ceph.get_running_osds()
613
-    if prev_status != 'blocked':
613
+    if not prev_message.startswith('Non-pristine'):
614 614
         if not running_osds:
615 615
             status_set('blocked',
616 616
                        'No block devices detected using current configuration')

Loading…
Cancel
Save