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

Replace unwrap calls with filter_map #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jmagnuson
Copy link

Fixes an issue where accessing cgroups for ephemeral systemd services results in a panic.

Dec 03 21:11:35 user systemd[1]: Started Prometheus PSI Exporter.
Dec 03 21:11:35 user psi_exporter[1087]: Listening address: 127.0.0.1:9093
Dec 04 01:45:09 user psi_exporter[1087]: thread 'main' panicked at src/main.rs:187:45:
Dec 04 01:45:09 user psi_exporter[1087]: called `Result::unwrap()` on an `Err` value: Error { depth: 2, inner: Io { path: Some("/sys/fs/cgroup/system.slice/a-timer-service.service"), err: Os { code: 2, kind: NotFound, message…e or directory" } } }
Dec 04 01:45:09 user psi_exporter[1087]: note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Dec 04 01:45:09 user systemd[1]: psi-exporter.service: Main process exited, code=exited, status=101/n/a
Dec 04 01:45:09 user systemd[1]: psi-exporter.service: Failed with result 'exit-code'.
Dec 04 01:45:09 user systemd[1]: psi-exporter.service: Consumed 3.543s CPU time.

Fixes an issue where accessing cgroups for ephemeral systemd services
results in a panic.
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

Successfully merging this pull request may close these issues.

1 participant