Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JUJU_VERSION not set during metrics hooks #372

Closed
jameinel opened this issue Aug 12, 2020 · 7 comments
Closed

JUJU_VERSION not set during metrics hooks #372

jameinel opened this issue Aug 12, 2020 · 7 comments

Comments

@jameinel
Copy link
Member

As seen by @camille-rodriguez :
During 'meter-status-changed'
https://paste.ubuntu.com/p/WZfMRkvgyn/

Metrics hooks run in a Limited context which seems to define its own set of vars:
https://github.com/juju/juju/blob/develop/worker/uniter/runner/context/context.go#L946
vs
https://github.com/juju/juju/blob/develop/worker/meterstatus/context.go#L44

Ideally this also gets fixed in Juju, but in the short term, we don't want to break because of a meter-status-changed or a collect-metrics hook getting triggered.

@jameinel
Copy link
Member Author

https://bugs.launchpad.net/juju/+bug/1891337 is about fixing this in Juju

@chipaca
Copy link
Contributor

chipaca commented Aug 12, 2020

I think doing #365 will address this, won't it?

@jameinel
Copy link
Member Author

jameinel commented Aug 12, 2020 via email

@dstathis
Copy link
Contributor

Should this still be open? #365 was merged already.

@jameinel
Copy link
Member Author

jameinel commented Aug 26, 2020 via email

@johnsca
Copy link
Contributor

johnsca commented Sep 2, 2020

You could fall back to querying the machine agent, like charmhelpers does.

@benhoyt
Copy link
Collaborator

benhoyt commented Apr 28, 2023

Can close this for now -- now always running "new Juju" (2.8 or whatever it is).

@benhoyt benhoyt closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants