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

Implement handling of missing files #93

Merged
merged 1 commit into from
Jan 20, 2022

Conversation

raemer
Copy link

@raemer raemer commented Aug 20, 2021

Pull Request (PR) description

This pull requests add a paramter (ignore_missing) that allows controlling the behavior, if a path is not found on the target system. Currently, the modules fails at this point, as setfacl/getfacl fails.
With the new parameter, this can be configured to fail with error (as now; default), issue a notice in the agent's output or silently ignore the error.

Use case example

In our use case, we want to allow a monitoring user to read git repos in order to determine if they are at a specific commit. To allow this, we add u:monitoring:rx to the repo, via a hiera hash evaluated in a module present for each node. On some systems, this path may be missing (and is not monitored). We would like to be able to ignore this, as the repo also will not be checked.
We do not implenent the ACL in the monitoring module, as there may be requirements to add further ACLs to the same path.

@bastelfreak
Copy link
Member

jey @raemer, can you please rebase against our latest master branch? we did some work on the co pipeline.

@raemer
Copy link
Author

raemer commented Sep 13, 2021

jey @raemer, can you please rebase against our latest master branch? we did some work on the co pipeline.

Hi, I rebased and fixed a few indentation/code unreachable warnings.

If a ACL for a missing file was specified, the modules failed. This
patch adds a parameter "ignore missing" that allows to specify the
behavior:
- raise an argument error (default)
- quietly ignore this ACL
- add a notice to the agent output and ignore the ACL
@bastelfreak bastelfreak added the enhancement New feature or request label Jan 20, 2022
@bastelfreak
Copy link
Member

@raemer thanks for the work. I rebased it again and will merge it.

@bastelfreak bastelfreak merged commit 0a98032 into voxpupuli:master Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants