Skip to content

Commit

Permalink
fix update_status for contrail-kubernetes-master
Browse files Browse the repository at this point in the history
it must update self status even if its not a leader
  • Loading branch information
Andrey-mp committed Jul 19, 2019
1 parent 5069811 commit 31504cd
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,12 @@ def leader_settings_changed():

@hooks.hook("update-status")
def update_status():
if not is_leader():
return
# try to obtain token again if it's not set yet
changed = utils.update_kubernetes_token()
if not changed:
return
# notify clients
_notify_controller()
if is_leader():
# try to obtain token again if it's not set yet
changed = utils.update_kubernetes_token()
if changed:
# notify clients
_notify_controller()
# and update self
utils.update_charm_status()

Expand Down

0 comments on commit 31504cd

Please sign in to comment.