The actual promise from Juju is that from the time you call 'is-leader'
and get a True value, that you will have 30s before we would possibly
return True to any other unit.

Internally the mechanism is that we obtain a lease (valid for 1 minute)
and attempt to renew that lease every 30s (so the very latest time you
could call is-leader is with 31s left, if we failed to renew the
leadership token).

Is it possible that there is a gap from when you call "is-leader" until
you actually do "leader-set" that is longer than 30s? I'm wondering if
you're running into load issues causing us to fail to renew the
leadership during normal operation.

We do persist who has leadership in the database, which means it should
be stable across the API server restarting, etc. I haven't heard of a
case where 'is-leader' can return true but leader-set would then
immediately fail, but I can imagine that load could play a factor.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1654116

Title:
  Attempts to write leadership settings when not the leader during
  relation-changed hooks

To manage notifications about this bug go to:
https://bugs.launchpad.net/autopilot-log-analyser/+bug/1654116/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to