-
Notifications
You must be signed in to change notification settings - Fork 545
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
logs: Use journalctl -o with-unit for default logs #3346
base: main
Are you sure you want to change the base?
Conversation
684b5bd
to
85981fe
Compare
Congratulations! One of the builds has completed. 🍾 You can install the built RPMs by following these steps:
Please note that the RPMs should be used only in a testing environment. |
Latest sos on EL 7 is sos-3.9. sos-4.0+ requires python3, so we don't have an EL7 target for recent/new releases. As far as this change goes, I can see the use case here but I wonder about two points
Point 2 highlights the need for automation tools to use the included |
It's a change, but the premise is that "grokability" improves with this. In some cases, by a lot; the syslog identifier can just vary wildly in value. I gave a few examples in other PRs, but in a nutshell, e.g.:
In this example I ran the units serially, but if the units are run in parallel it can be really hard to figure out which logs correspond to which unit, as they're just attributed to
Ohh, right I didn't realize that the filename is changed. Hmm, well, we could override that? |
Actually, I didn't realize at first this was nested in I'm not sure at all about what/any automation Google is using on sos report coming from COS systems, but as written this wouldn't have any effect on RHEL boxes. |
Oops, I admit to not testing this locally... |
85981fe
to
fc43d69
Compare
(Now lightly tested locally) I started to add an option to fall back to default syslog, but ISTM that because |
We have some automation of checking logs as well in Canonical, so will need to check these items before I would give a +1. comparing the 2 outputs, the format of the timestamps looks different too. I will liaise with our team as well, if that's ok |
Of course, there's no urgency on this, and I agree we should have a sense of the potential fallout. (But I'd say nearly every single time I've read a sosreport journal I've come across at least one ambiguous case where I wanted this) |
Based on our internal discussions, this looks good, and should not affect our automation so, ack from me, we just need to resolve the one test that is failing in the stage one testing |
Before systemd was created, syslog was the dominant Unix logging system. Later, systemd introduced the journal whose output intentionally exactly matched that of syslog for compatibility. In systemd, the "unit" is the technical heart of things; yet the syslog output only includes the "syslog identifier" which might or might not look like the unit. For many units that just run shell script, the syslog identifier is just "bash" which is not useful. The `-o with-unit` is in RHEL8 and above; it's not in RHEL7. I don't know if it is a goal of this project to ship the latest releases on very old operating systems. If it is, we can try to do dynamic detection. Signed-off-by: Colin Walters <walters@verbum.org>
fc43d69
to
375983f
Compare
Thanks! I'm not familiar with avocado; took a blind attempt at a fix, if that doesn't work will dig in. |
I've restarted the CI jobs to cycle back on this - the logs have been purged so I'm no longer sure what the initial problem was. Assuming these tests fail again, we can merge once the failing test case is resolved. Overall I think the change is fine, especially with @arif-ali reporting no ill effect on the Canonical side of the house. |
@cgwalters the tests need fixing if this is going to go through, do you have interest in pursuing this PR? |
Before systemd was created, syslog was the dominant Unix logging system.
Later, systemd introduced the journal whose output intentionally exactly matched that of syslog for compatibility.
In systemd, the "unit" is the technical heart of things; yet the syslog output only includes the "syslog identifier" which might or might not look like the unit.
For many units that just run shell script, the syslog identifier is just "bash" which is not useful.
The
-o with-unit
is in RHEL8 and above; it's not in RHEL7. I don't know if it is a goal of this project to ship the latest releases on very old operating systems. If it is, we can try to do dynamic detection.Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines