Skip to content

Comments

Fix panic when using systemd compatibility flags#2009

Closed
SuperQ wants to merge 1 commit intomasterfrom
superq/fix_systemd_flag_compat
Closed

Fix panic when using systemd compatibility flags#2009
SuperQ wants to merge 1 commit intomasterfrom
superq/fix_systemd_flag_compat

Conversation

@SuperQ
Copy link
Member

@SuperQ SuperQ commented Mar 19, 2021

Define the flag defaults as a const to avoid panic when
backwards comatibility flags are used.

Fixes: #1999

Signed-off-by: Ben Kochie superq@gmail.com

Define the flag defaults as a const to avoid panic when
backwards comatibility flags are used.

Fixes: #1999

Signed-off-by: Ben Kochie <superq@gmail.com>
@SuperQ
Copy link
Member Author

SuperQ commented Mar 19, 2021

This is a simpler fix than #2000.

@roidelapluie
Copy link
Member

./node_exporter --collector.systemd.unit-include=".+" --collector.systemd.unit-whitelist="bar" --collector.systemd does not fail

@SuperQ
Copy link
Member Author

SuperQ commented Mar 19, 2021

Hmm, I guess I'm not sure that's a huge deal, but I can see how it would be confusing.

I think the original idea that we make it panic on both flags was a bit of a poor decision.

@SuperQ SuperQ closed this Mar 19, 2021
@SuperQ SuperQ deleted the superq/fix_systemd_flag_compat branch March 19, 2021 15:21
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.

panic when using --collector.systemd.unit-whitelist

2 participants