Prevent unnecessary nova-compute restarts on ceph_changed
Function 'is_broker_action_done' should return False when it
finds a response from ceph broker not marked done, in order
to trigger a nova restart. However, it also returns False if
there is no response data from ceph broker, triggering an
unecessary restart.
The function 'ceph_changed' is invoked under different remote
unit contexts when there are updates to the relation. When
querying the broker response, only the context of the remote
unit that is the broker can see the response, unless
specifically queried for that given unit.
The 'ceph_changed' invocations under a remote context that
are not the broker end up returning False in
'is_broker_action_done' and causing restarts, even after
the action is already marked done. This also happens on
'config-changed' hooks.
To fix this problem, the logic is now changed have each
'ceph_changed' invocation loop through units and process
the broker response, regardless of remote context.
This is an initial change to address the issue locally
in nova-compute charm. A later change will be worked on
to move the new helper methods to charmhelpers,
refactoring the existing ones there.
Reviewed: https:/ /review. opendev. org/676407 /git.openstack. org/cgit/ openstack/ charm-nova- compute/ commit/ ?id=b1701e1b317 4dcb06c05684319 d6c73d6b2f509c
Committed: https:/
Submitter: Zuul
Branch: master
commit b1701e1b3174dcb 06c05684319d6c7 3d6b2f509c
Author: Rodrigo Barbieri <email address hidden>
Date: Thu Jul 11 17:44:09 2019 -0300
Prevent unnecessary nova-compute restarts on ceph_changed
Function 'is_broker_ action_ done' should return False when it
finds a response from ceph broker not marked done, in order
to trigger a nova restart. However, it also returns False if
there is no response data from ceph broker, triggering an
unecessary restart.
The function 'ceph_changed' is invoked under different remote
unit contexts when there are updates to the relation. When
querying the broker response, only the context of the remote
unit that is the broker can see the response, unless
specifically queried for that given unit.
The 'ceph_changed' invocations under a remote context that broker_ action_ done' and causing restarts, even after changed' hooks.
are not the broker end up returning False in
'is_
the action is already marked done. This also happens on
'config-
To fix this problem, the logic is now changed have each
'ceph_changed' invocation loop through units and process
the broker response, regardless of remote context.
This is an initial change to address the issue locally
in nova-compute charm. A later change will be worked on
to move the new helper methods to charmhelpers,
refactoring the existing ones there.
Change-Id: I2b41f8b252f4cc b68830e90c5e684 56e15372bcf
Closes-bug: #1835045