Browse Source

Don't run periodic_share_replica_update() on active replicas

Similarly to periodic_share_replica_snapshot_update() skip active
replicas and do what the comment above says.

Change-Id: I719c670416c06f8eb9228a3537034285ae3733b4
Partial-Bug: #1924230
(cherry picked from commit 5ba3117f20)
(cherry picked from commit c44108f9ce)
changes/16/824616/1
Maurice Escher 1 year ago committed by Goutham Pacha Ravi
parent
commit
860b45e21f
  1. 3
      manila/share/manager.py
  2. 6
      releasenotes/notes/bug-1924230-skip-periodic-task-for-active-replica-030a982af92f8a62.yaml

3
manila/share/manager.py

@ -2445,7 +2445,8 @@ class ShareManager(manager.SchedulerDependentManager):
# Filter only non-active replicas belonging to this backend
def qualified_replica(r):
return (share_utils.extract_host(r['host']) ==
share_utils.extract_host(self.host))
share_utils.extract_host(self.host) and
r['replica_state'] != constants.REPLICA_STATE_ACTIVE)
replicas = list(filter(lambda x: qualified_replica(x), replicas))
for replica in replicas:

6
releasenotes/notes/bug-1924230-skip-periodic-task-for-active-replica-030a982af92f8a62.yaml

@ -0,0 +1,6 @@
---
fixes:
- Fixed periodic_share_replica_update() to skip active replicas similarly to
periodic_share_replica_snapshot_update(). The intention is to check on
non-active replicas, that can be 'in_sync', 'out_of_sync' or in 'error'
state.
Loading…
Cancel
Save