cert-formula icon indicating copy to clipboard operation
cert-formula copied to clipboard

[BUG] No certs in pillar causes onchanges for update to fail

Open seerickcode opened this issue 4 years ago • 0 comments

Your setup

Formula commit hash / release tag

Master @ ef33d4d2306e409567788389d431897d4a144b8a

Versions reports (master & minion)

Salt Version: Salt: 3003

Pillar / config used

None/Empty


Bug details

If the cert state is called (default) and there is no certs in the pillar cert-updated-system-cmd.run will fail because onchanges::sls::cert.deployed.files didn't render to anything (no state).

Steps to reproduce the bug

With no content in cert::certlist in pillar do:

salt-call --state-verbose=false state.sls cert

Result:

local:
----------
          ID: cert-updated-system-cmd.run
    Function: cmd.run
        Name: update-ca-certificates --fresh
      Result: False
     Comment: The following requisites were not found:
                                 onchanges:
                                     sls: cert.deployed.files
--cut---

Expected behaviour

No action, No error

Attempts to fix the bug

Fixed by adding nop state to head of deployed/files.sls. Patch inbound

Additional context

Perhaps related to #29

seerickcode avatar Sep 24 '21 18:09 seerickcode