saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Install Salt from the Salt package repositories here:
https://docs.saltproject.io/salt/install-guide/en/latest/
Apache License 2.0
14.18k stars 5.48k forks source link

Manage runner broken for 'alived' and 'no_alived' when called from a Master of Masters #39906

Closed shorawitz closed 6 years ago

shorawitz commented 7 years ago

Description of Issue/Question

When using the "manage" runner on a normal master | syndic, the "alived" and "not_alived" functions return a list of minions as expected. When run on a Master of Masters, they return the opposite list of minions as expected - offline minions show up using "alived", online minions show up using "not_alived".

Setup

mom.conf

order_masters: True

syndic.conf

syndic_master:
  - mom-master

Steps to Reproduce Issue

root@saltmom-a:~# salt-key
Accepted Keys:
online-syndic-a
online-syndic-b
offline-syndic-c
Denied Keys:
Unaccepted Keys:
Rejected Keys:
root@saltmom-a:~# salt-run manage.alived
- offline-syndic-c
root@saltmom-a:~# salt-run manage.not_alived
- online-syndic-a
- online-syndic-b
root@saltmom-a:~# salt-run manage.up
- online-syndic-a
- online-syndic-b
- online-minion-01
root@saltmom-a:~# salt-run -t 5 manage.down
- offline-syndic-c

Versions Report

root@saltmom-a:~# salt --versions-report
Salt Version:
           Salt: 2016.11.3

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 2.4.2
          gitdb: 0.6.4
      gitpython: 1.0.1
          ioflo: Not Installed
         Jinja2: 2.8
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: 1.0.3
   msgpack-pure: Not Installed
msgpack-python: 0.4.6
   mysql-python: 1.3.7
      pycparser: Not Installed
       pycrypto: 2.6.1
         pygit2: Not Installed
         Python: 2.7.12 (default, Nov 19 2016, 06:48:10)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 15.2.0
           RAET: Not Installed
          smmap: 0.9.0
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.1.4

System Versions:
           dist: Ubuntu 16.04 xenial
        machine: x86_64
        release: 4.4.0-66-generic
         system: Linux
        version: Ubuntu 16.04 xenial
gtmanfred commented 7 years ago

This is very odd.

Thanks for reporting this! Daniel

sastorsl commented 7 years ago

+1

Multi-master as according to the docs.

.alived returns nothing. .not_alived returns all my minions (all are up)

# salt --versions-report
Salt Version:
           Salt: 2016.11.3

Dependency Versions:
           cffi: Not Installed
       cherrypy: 3.2.2
       dateutil: 1.5
          gitdb: 0.5.4
      gitpython: 0.3.2 RC1
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: 0.21.1
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.6
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
         pygit2: Not Installed
         Python: 2.7.5 (default, Aug  2 2016, 04:20:16)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 15.3.0
           RAET: Not Installed
          smmap: 0.8.1
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.1.4

System Versions:
           dist: redhat 7.3 Maipo
        machine: x86_64
        release: 3.10.0-514.16.1.el7.x86_64
         system: Linux
        version: Red Hat Enterprise Linux Server 7.3 Maipo
sastorsl commented 7 years ago

Could this issue https://github.com/saltstack/salt/issues/16499 be even remotely related? Please feel free to remove this comment if not as not to confuse the issue.

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.