saltstack / saltstack/salt

[BUG] salt.runner inconsistency with test mode

Open
#56,939 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug severity-low
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description

I'm trying to run orchestration of orchestrations via salt.runner with requisites.

My SLS:
https://gist.github.com/Oloremo/8df5fe393e0bb4d6d635610305a0ad74

When I execute it via salt-run state.orch path.to.sls

And here is the output:
https://gist.github.com/Oloremo/de68647342ea68a14587fe66ffe201ab

As you can see the first orchestration executed with test mode and everything as expected but all following just skipped the execution altogether like if I pass test=True via CLI(which I didn't).
I kinda assume that test: True from zookeeper orchestration somehow passed back via some context and next salt.runners acted like it's test=True is set.

Wanna make it more fun?
When I execute it via salt-run state.orch path.to.sls test=False the output is different!

https://gist.github.com/Oloremo/023b62102db6231b612990825c48fa51

So, in that case, it seems to run hadoop only. Something is really wrong here.

Setup
Provided above.

Steps to Reproduce the behavior
It should be reproducible with the same orchestration SLS template as above.

Expected behavior
When I pass test: True to and orchestration args and run saIt-run state.orch with Test=False expect that all runners will be executed with test: True since it was explicitly set as an argument.

Versions Report

Salt Version:
           Salt: 3000.1

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
         Jinja2: 2.11.1
        libgit2: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.6.2
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 3.6.8 (default, Aug  7 2019, 17:28:10)
   python-gnupg: 0.4.5
         PyYAML: 3.11
          PyZMQ: 18.0.2
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.3.1

System Versions:
           dist: centos 7.5.1804 Core
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-862.3.2.el7.x86_64
         system: Linux
        version: CentOS Linux 7.5.1804 Core

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

Reproduce the behavior with the linked orchestration SLS and the three salt-run state.orch commands, comparing test-mode handling across the nested runners. Trace how the test argument is passed between orchestrations and verify that each runner follows the explicitly supplied value without affecting subsequent runs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.