Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`leader-settings-changed` firing before unit departure

See original GitHub issue

Hi team. I had some weird behavior for this set up / situation

For Example. If you have these units:

A *

and A departs then you get these events hooks for each unit: A: leader-settings-changed , mongodb-storage-detaching, mongodb-relation-departed(for A-B), mongodb-relation-departed(for A-C), stop, remove B: mongodb-relation-departed (for A-B) C: mongodb-relation-departed (for A-C),

According to @wallyworld and @rwcarlsen this is unexpected behaviour and should be looked into. As requested, this is my repo/branch where I observed this behaviour. It can be observed by first creating the necessary environment according to Once the environment has been created you can reproduce this with:

# pack and deploy
charmcraft pack
juju deploy -n3 ./*charm

# in a separate session
juju debug-hooks <leader_unit>

# remove unit 
juju remove-unit <leader_unit

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

jameinelcommented, Mar 1, 2022

This doesn’t feel like an operator framework issue, but a juju issue

On Tue, Mar 1, 2022, 17:06 Robert Carlsen @.***> wrote:

If @wallyworld could clarify exactly what juju should be doing here that would help inform the best approach for dealing with things in the ops framework here.

— Reply to this email directly, view it on GitHub, or unsubscribe . Triage notifications on the go with GitHub Mobile for iOS or Android

You are receiving this because you are subscribed to this thread.Message ID: @.***>

jnsgrukcommented, Mar 11, 2022

Nice, thanks all. Will close this for now and we can track this issue in the bug that Mia filed 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

leader-settings-changed firing before unit departure
Hi team. I had some weird behavior for this set up / situation For Example. If you have these units: ``` A *...
Read more >
A charm's life - Juju
Both relation and storage events are guaranteed to fire before stop / remove if they will fire at all. They are optional, in...
Read more >
charm-nova-cloud-controller/ at master
Dbs can appear to be ready before the units ... NOTE(jamespage): Force re-fire of shared-db joined hook ... 'Waiting for cache expiry before...
Read more >
Geeky | Tomechangosubanana - since 1995!
The two leader hooks are needed because leader-elected is only fired on the actual leader unit; all the others get leader-settings-changed ...
Read more >
+ + Note that events firing during a CollectMetricsEvent are currently + sandboxed in ... This + can occur before units for those...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found