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

Add pebble log forwarding support check to jujuversion #1230

Closed
sed-i opened this issue May 27, 2024 · 4 comments · Fixed by #1370
Closed

Add pebble log forwarding support check to jujuversion #1230

sed-i opened this issue May 27, 2024 · 4 comments · Fixed by #1370
Labels
feature New feature or request small item

Comments

@sed-i
Copy link
Contributor

sed-i commented May 27, 2024

Following up on #1074, should we add something to ops/jujuversion.py?
E.g. supports_pebble_log_forwarding.
I realize it's a pebble feature, but since the two are in lockstep then perhaps it makes sense?

@benhoyt
Copy link
Collaborator

benhoyt commented May 27, 2024

@sed-i Do you think this will be needed in charms, that is, support for both older versions of Juju (without log forwarding) and newer ones with it?

@sed-i
Copy link
Contributor Author

sed-i commented May 28, 2024

I've been asked to for postgresql-k8s.

Afaiu, in air-gapped, the plan is to use juju 3.4.1+ (and not download promtail), but otherwise to not force people to upgrade. Having the ability to use either, helps charm authors by not requiring them to open a new track.

It seems like this check will be repeated in every charm that logs to loki and that needs to work with juju < 3.4.1 and be deployed airgapped. Not sure about the number of charms in that intersection.

@benhoyt
Copy link
Collaborator

benhoyt commented May 28, 2024

I'm okay with adding a JujuVersion.support_pebble_log_forwarding property. However, there's "log forwarding with Loki" (Pebble v1.4.0) and log labels (Pebble v1.6.0) -- without log labels, log forwarding isn't nearly as useful. Juju 3.3 includes Pebble v1.4.x (basic log forwarding), and Juju 3.4 includes Pebble v1.7.x (log labels as well). Do you think support_pebble_log_forwarding should be from Juju 3.4 onwards?

@sed-i
Copy link
Contributor Author

sed-i commented May 31, 2024

Thanks @benhoyt.
Yes, I think 3.4 (3.4.1?) is the right way to go.

From a first glance at github search results, this might get used around.

@tonyandrewmeyer tonyandrewmeyer added feature New feature or request small item labels Aug 2, 2024
tonyandrewmeyer added a commit to tonyandrewmeyer/operator that referenced this issue Oct 4, 2024
…anonical#1370)

Adds a new property to `JujuVersion` indicating if the version of Pebble
bundled with Juju supports log forwarding to Loki, with labels.

See discussion in canonical#1230 around which version of log forwarding should be
the cutoff for support, which landed on when labels were added.

Fixes canonical#1230
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request small item
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants