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

fix(node_exporter): Fix ProtectHome for textfiles #184

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

SuperQ
Copy link
Contributor

@SuperQ SuperQ commented Aug 4, 2023

Set the node_exporter ProtectHome=read-only when the textfile dir is in /home.

Fixes: #183

@SuperQ SuperQ requested a review from gardar August 4, 2023 13:37
@SuperQ SuperQ force-pushed the superq/node_textfile_home branch from fb6345f to 7a7e76a Compare August 4, 2023 15:02
@github-actions github-actions bot added bugfix and removed bugfix labels Aug 4, 2023
@SuperQ SuperQ force-pushed the superq/node_textfile_home branch from 7a7e76a to 597e7df Compare August 4, 2023 15:13
@github-actions github-actions bot added bugfix and removed bugfix labels Aug 4, 2023
@github-actions github-actions bot added bugfix and removed bugfix labels Aug 16, 2023
@SuperQ SuperQ force-pushed the superq/node_textfile_home branch from ebb763f to b931ba4 Compare August 16, 2023 15:53
@github-actions github-actions bot added bugfix and removed bugfix labels Aug 16, 2023
@github-actions github-actions bot added bugfix and removed bugfix labels Aug 16, 2023
@SuperQ SuperQ requested a review from gardar August 16, 2023 17:49
@gardar gardar force-pushed the superq/node_textfile_home branch from fa18448 to 59b3136 Compare August 16, 2023 17:56
@github-actions github-actions bot added bugfix and removed bugfix labels Aug 16, 2023
@gardar gardar force-pushed the superq/node_textfile_home branch from 59b3136 to b941d90 Compare August 16, 2023 18:13
@github-actions github-actions bot added bugfix and removed bugfix labels Aug 16, 2023
@gardar gardar force-pushed the superq/node_textfile_home branch from b941d90 to 55507f9 Compare August 17, 2023 14:15
@github-actions github-actions bot removed the bugfix label Aug 17, 2023
@SuperQ
Copy link
Contributor Author

SuperQ commented Aug 17, 2023

I have no idea what's causing the node_exporter alternative to fail. :(

@gardar
Copy link
Member

gardar commented Aug 18, 2023

I have no idea what's causing the node_exporter alternative to fail. :(

Found out that it was because the version number variable set for that scenario was set to version 1.0.0 which does not support --web.config.file
The way the version number variable was set caused it to be set only for the preparation task, which made the rest of the run unaware of the version being used.

Fixed in #197 by moving the molecule variables of all of the roles out of the playbooks and into the molecule configs so that they are accessible for every step of the molecule runs.
Also added logging on service status failures so that we can spot issues like this in the future without jumping through multiple hoops.

@SuperQ SuperQ force-pushed the superq/node_textfile_home branch from 55507f9 to 6659564 Compare August 21, 2023 18:33
@github-actions github-actions bot added bugfix and removed bugfix labels Aug 21, 2023
Set the node_exporter `ProtectHome=read-only` when the textfile dir is
in `/home`.

Fixes: #183

Signed-off-by: SuperQ <[email protected]>
@SuperQ SuperQ force-pushed the superq/node_textfile_home branch from 6659564 to 655afd6 Compare August 22, 2023 04:50
@github-actions github-actions bot added bugfix and removed bugfix labels Aug 22, 2023
@SuperQ SuperQ merged commit d7ad271 into main Aug 22, 2023
@SuperQ SuperQ deleted the superq/node_textfile_home branch August 22, 2023 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

consider not modifying the node exporter user if it already exists
2 participants