plus3it / plus3it/ash-linux-formula
[BUG] Newer SaltStack Versions Are More-Pedantic About `replace` Parameter
Nobody has claimed this yet.
- Dominant language
- SaltStack
- Stars
- 19
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
When running formula using newer versions of Saltstack, a warning message like:
[WARNING ] State for file: /etc/fapolicyd/rules.d/30-aws.rules - Neither 'source' nor 'contents' nor 'contents_pillar' nor 'contents_grains' was defined, yet 'replace' was set to 'True'. As there is no source to replace the file with, 'replace' has been set to 'False' to avoid reading the file unnecessarily.
When the ash-linux/el8/VendorSTIG/aws_cli_v2.sls and ash-linux-formula/ash-linux/el9/VendorSTIG/aws_cli_v2.sls files are referenced
Severity
- Completely Broken (No work-around evident)
- Severely Broken (Work-around possible but difficult)
- Moderately Broken (Trivial work-around)
- Nuisance (Functions but untrapped errors can slip through)
To Reproduce
Steps to reproduce the behavior:
- Deploy new ELx host
- Run formula
- Look in run-logs for the previously transcribed log-snippet
Expected behavior
No warning is emitted
Deviance Description
Warning message is emitted. While effectively innocuous, it may alarm more-casual formula-users
Screenshots
Additional context
Fix Suggestions
Add:
- replace: True
To mentioned states
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open the referenced aws_cli_v2.sls states at ash-linux/el8/VendorSTIG/aws_cli_v2.sls and ash-linux-formula/ash-linux/el9/VendorSTIG/aws_cli_v2.sls, then compare their file declarations with the reported Salt warning. Update the mentioned states as suggested and deploy the formula on an ELx host to verify that the warning is no longer emitted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- operating-systems, security
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 86/100