Comment 11 for bug 1835045

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-nova-compute (master)

Reviewed: https://review.opendev.org/676407
Committed: https://git.openstack.org/cgit/openstack/charm-nova-compute/commit/?id=b1701e1b3174dcb06c05684319d6c73d6b2f509c
Submitter: Zuul
Branch: master

commit b1701e1b3174dcb06c05684319d6c73d6b2f509c
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
    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.

    Change-Id: I2b41f8b252f4ccb68830e90c5e68456e15372bcf
    Closes-bug: #1835045