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 multi-sls `salt.state` orchestration in masterless systems #48418

Merged
merged 1 commit into from Jul 13, 2018

Conversation

Projects
None yet
3 participants
@pritambaral
Contributor

pritambaral commented Jul 3, 2018

What does this PR do?

Fix multi-sls salt.state orchestration in masterless systems

Previous Behavior

When salt.state orchestration on masterless systems was introduced (in 8e3abb1), only the single-string in sls case was supported:

<name>:
  salt.state:
    - sls: '...'

The documentation for salt.state says multiple sls files can be supplied in a list:

<name>:
  salt.state:
    - sls:
      - ...
      - ...
      - ...

But with masterless orchestration, this does not work because the original patch passes a list containing a joined string of comma-separated sls files instead of the joined string itself:

 No matching sls found for 'common,postgresql.repo,postgresql.server' in env 'base'

New Behavior

Multiple sls files passed as a list works on masterless systems by individually running each sls file.

Tests written?

No

Commits signed with GPG?

Yes

Other notes

Originally submitted on salt-users: https://groups.google.com/forum/#!topic/salt-users/fhJYB2ELEM8

Fix multi-sls `salt.state` orchestration in masterless systems
When `salt.state` orchestration on masterless systems was introduced (in
8e3abb1), only the single-string in `sls` case was supported:

```yaml
<name>:
  salt.state:
    - sls: '...'
```

The documentation for `salt.state` says multiple sls files can be supplied in a
list:

```yaml
<name>:
  salt.state:
    - sls:
      - ...
      - ...
      - ...
```

But with masterless orchestration, this does not work because the original
patch passes a list containing a joined string of comma-separated sls files
instead of the joined string itself.

This takes care of that case too by passing joined string, since `state.sls`
handles comma-separated joined string just fine.

@rallytime rallytime requested a review from garethgreenaway Jul 6, 2018

@rallytime rallytime merged commit 2a27e36 into saltstack:develop Jul 13, 2018

11 of 17 checks passed

continuous-integration/jenkins/pr-merge This commit cannot be built
Details
jenkins/PR/salt-pr-linode-ubuntu16-py3 Pull Requests » Salt PR - Linode Ubuntu16.04 - PY3 #11167 — ABORTED
Details
default Build finished.
Details
jenkins/pr/lint The lint job has failed
Details
jenkins/pr/py2-ubuntu-1604 The py2-ubuntu-1604 job has failed
Details
jenkins/pr/py3-centos-7 The py3-centos-7 job has failed
Details
WIP ready for review
Details
codeclimate All good!
Details
jenkins/PR/salt-pr-clone Pull Requests » Salt PR - Clone #26408 — SUCCESS
Details
jenkins/PR/salt-pr-docs-n Pull Requests » Salt PR - Docs #18445 — SUCCESS
Details
jenkins/PR/salt-pr-linode-cent7-py3 Pull Requests » Salt PR - Linode CentOS 7 - PY3 #6197 — SUCCESS
Details
jenkins/PR/salt-pr-linode-ubuntu14-n Pull Requests » Salt PR - Linode Ubuntu14.04 #24125 — SUCCESS
Details
jenkins/PR/salt-pr-lint-n Pull Requests » Salt PR - Code Lint #23080 — SUCCESS
Details
jenkins/PR/salt-pr-rs-cent7-n Pull Requests » Salt PR - RS CentOS 7 #20250 — SUCCESS
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/py2-centos-7 The py2-centos-7 job has passed
Details
jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has passed
Details

@pritambaral pritambaral deleted the pritambaral:fix/masterless-orch-sls branch Jul 14, 2018

@pritambaral pritambaral restored the pritambaral:fix/masterless-orch-sls branch Jul 15, 2018

@pritambaral pritambaral deleted the pritambaral:fix/masterless-orch-sls branch Jul 15, 2018

@pritambaral pritambaral referenced this pull request Jul 15, 2018

Merged

Backport 48418 #48594

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment