This sounds like we got into a bad state where a hook failed, and our logic
around automatically retrying hooks that are in error state, is not a good
fit around leader-elected.
The one option from the charm is to just return if is_leader returns false
instead of failing. That would avoid having the hook go into error state
and triggering juju to retry the hook.
John
=:->
On Tue, Dec 5, 2017 at 3:27 AM, Haw Loeung <email address hidden>
wrote:
> Seeing this as well with a 2.2.6 environment.
>
> | ubuntu@ip-172-30-18-69:~$ sudo juju-run ubuntu-repository-cache/5
> 'is-leader'
> | False
>
> | ubuntu@ip-172-30-18-69:~$ sudo juju-run ubuntu-repository-cache/5
> 'leader-get'
> | leader_id: ubuntu-repository-cache/4
>
> At some point, this unit must have been elected as the leader and now it
> keeps trying to run the leader-elected hook.
>
> --
> You received this bug notification because you are subscribed to juju-
> core.
> Matching subscriptions: juju bugs
> https://bugs.launchpad.net/bugs/1723184
>
> Title:
> Multiple units told they are leaders
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1723184/+subscriptions
>
This sounds like we got into a bad state where a hook failed, and our logic
around automatically retrying hooks that are in error state, is not a good
fit around leader-elected.
The one option from the charm is to just return if is_leader returns false
instead of failing. That would avoid having the hook go into error state
and triggering juju to retry the hook.
John
=:->
On Tue, Dec 5, 2017 at 3:27 AM, Haw Loeung <email address hidden>
wrote:
> Seeing this as well with a 2.2.6 environment. ip-172- 30-18-69: ~$ sudo juju-run ubuntu- repository- cache/5 ip-172- 30-18-69: ~$ sudo juju-run ubuntu- repository- cache/5 repository- cache/4 /bugs.launchpad .net/bugs/ 1723184 /bugs.launchpad .net/juju/ +bug/1723184/ +subscriptions
>
> | ubuntu@
> 'is-leader'
> | False
>
> | ubuntu@
> 'leader-get'
> | leader_id: ubuntu-
>
> At some point, this unit must have been elected as the leader and now it
> keeps trying to run the leader-elected hook.
>
> --
> You received this bug notification because you are subscribed to juju-
> core.
> Matching subscriptions: juju bugs
> https:/
>
> Title:
> Multiple units told they are leaders
>
> To manage notifications about this bug go to:
> https:/
>