saltstack / saltstack/salt

result from state.highstate adds retcode=x also to other successful states for same minion

Open
#56,409 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description of Issue

When executing a state.highstate one of the many states may fail.
But in that case many other states also get the additional result-property retcode=2.
Still, "result=true" is set for all of them.

Setup

No special setup, just a master and several minions.
The sls files have several standard rules (test.show_notification, file.absent, file.managed, cmd.run, pkg.latest, pkg.purged, schedule.present and schedule.absent)

Steps to Reproduce Issue

Define an SLS for which one state will fail.
Run state.highstate.
See the failing state in the output, it has result=false and retcode=2.
See that several other states have result=true, but also retcode=2.
For minions where no states fail, the other states do not get retcode=2 added.

Versions Report

Note that the problem was present also before this version.

Salt Version:
           Salt: 3000
 
Dependency Versions:
           cffi: Not Installed
       cherrypy: unknown
       dateutil: 2.4.2
      docker-py: 2.6.1
          gitdb: 2.0.5
      gitpython: 2.1.11
         Jinja2: 2.8.1
        libgit2: Not Installed
       M2Crypto: 0.35.2
           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: Not Installed
         PyYAML: 3.12
          PyZMQ: 15.3.0
          smmap: 2.0.5
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.1.4
 
System Versions:
           dist: centos 7.7.1908 Core
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-1062.12.1.el7.x86_64
         system: Linux
        version: CentOS Linux 7.7.1908 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

Start by reproducing the issue with state.highstate using an SLS containing standard rules such as test.show_notification, file.absent, file.managed, cmd.run, pkg.latest, pkg.purged, schedule.present, and schedule.absent. Compare the returned properties for the failing and successful states; done means only the failing state reports retcode=2, while successful states retain result=true without that retcode.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.