plus3it / plus3it/ash-linux-formula

[BUG] Newer SaltStack Versions Are More-Pedantic About `replace` Parameter

Open Beginner friendly
#637 0 comments 0 reactions 0 assignees View on GitHub

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:

  1. Deploy new ELx host
  2. Run formula
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.