question-mark
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 *
B
C

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 CONTRIBUTING.md. 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

1reaction
jameinelcommented, Mar 1, 2022

This doesn’t feel like an operator framework issue, but a juju issue https://bugs.launchpad.net/juju/+filebug

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

If @wallyworld https://github.com/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 https://github.com/canonical/operator/issues/708#issuecomment-1055602228, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABRQ7LJCMY6NXLJDPRRCELU5Y6BRANCNFSM5PUM4PHA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

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

0reactions
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/nova_cc_hooks.py 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 >
https://osm.etsi.org/gitlab/vnf-onboarding/osm-pac...
+ + 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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found