salt-minion does not shutdown properly 2016.11.3 rh6

Created on 14 Mar 2017  路  4Comments  路  Source: saltstack/salt

Description of Issue/Question

When you try to stop salt-minion in rh6 in 2016.11.3 you don't get a log message that the minion received a sigterm and only kills one of the two processes that are running.

Setup

latest stable 2016.11.3

Steps to Reproduce Issue

Install the minion and try to stop it

Versions Report

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

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.7.3
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           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.6.6 (r266:84292, Aug 18 2016, 15:13:37)
   python-gnupg: 0.3.8
         PyYAML: 3.11
          PyZMQ: 14.5.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.0.5

System Versions:
           dist: centos 6.8 Final
        machine: x86_64
        release: 2.6.32-642.11.1.el6.x86_64
         system: Linux
        version: CentOS 6.8 Final
Bug Core P1 Regression ZRELEASED - 2016.11.4 ZRELEASED - 2016.3.6 fixed-pending-your-verification severity-critical severity-high

All 4 comments

I can confirm this on CentOS 6 and 7, it also seems that a self initiated restart does not work, causing one thread to hang as described here.

ping @terminalmage

38925 brakes this. if you swap order to ( which was initially )

        old_signals[signum] = signal.getsignal(signum)  
        signal.signal(signum, signal.SIG_DFL)

it works fine.

Okay i was only able to replicate this after connecting a minion to the master. If you just start up a minion not connected to a master I was not able to replicate this. Just FYI for anyone trying to replicate this.So to quickly replicate this do the following:

  1. install salt-master and salt-minion
  2. point minion to the local master master: localhost
  3. start master
  4. start minion
  5. service salt-minion stop
  6. ps axu | grep -i salt-mi and you will notice a process is left there.

And @tsaridas is right whne i switch those around in utils/process.py it starts working.

I also checked 2016.11.2 and this is working fine. Thanks for bringing this to our attention we will need to get this fixed.

Fixed in #40041.

Was this page helpful?
0 / 5 - 0 ratings