leader-set fails even if is_leader returned True

Bug #1909569 reported by Benjamin Allot
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Undecided
Unassigned

Bug Description

Hello,

This is probably a duplicate of LP#1723184 but opening a new one.

We had an issue with a juju 2.8.7 controller and model related to that.

The relevant pastebins are:

* https://pastebin.canonical.com/p/vBpcT6ZkSM/ for the charm side, which shows that the leader-set ended up with a permission denied.
The code can be found at https://bazaar.launchpad.net/~ubuntu-repository-cache-charmers/ubuntu-repository-cache/layer-ubuntu-repository-cache/view/293.1.1/reactive/ubuntu-repository-cache.py#L218

We can see that the code check for the leader with
```
    if not hookenv.is_leader():
        LOG('leader-elected fired. This is not the leader')
        return
```
However, we can see in the logs line 73 that this condition passed, resulting in
`2020-12-27 00:04:25 INFO juju-log leader-elected fired. This unit is the new leader: ubuntu-repository-cache/2`
to fail right after on the leader-set.

* The controller units' logs around that time can be found at https://pastebin.canonical.com/p/YBcdCpgjFQ/

Cheers,

Related branches

Revision history for this message
Joseph Phillips (manadart) wrote :

I don't believe this is a duplicate of 1723184.

It resembles https://bugs.launchpad.net/juju/+bug/1903810 though.

I will remove the 2.8 milestone added to 1723184.

Revision history for this message
Haw Loeung (hloeung) wrote :

Looking at the logs in the provided pastebin, the leader-set eventually succeded on u-r-c/0 but no leader-settings-changed hook fired and the leader_id setting still unchanged. So the other issue is leader-set returned success but did not actually update the leader setting its supposed to.

Changed in juju:
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.