Skip to content

When upgrading from 2015.8.10 to 2016.3.0 on centos7/redhat7 I have to restart the salt-minion twice  #33516

Closed

Description

@Ch3LL

Description of Issue/Question

When upgrading the salt-minion from 2015.8.10 to 2016.3.0 I have to restart the salt-minion twice in order for it to communicate back with the master.

Setup

  1. 2015.8.10 minion connected to a master

Steps to Reproduce Issue

  1. Install 2015.8.10
  2. point the local minion to the master
  3. veryify you can communicate with minion:
[root@ip-10-181-53-46 ~]# salt '*' test.version
ip-10-89-12-242.eu-west-1.compute.internal:
    2015.8.10

4.. upgrade to 2016.3.0
yum update salt-minion
7. restart processes;
[root@ip-10-181-53-46 ~]# service salt-minion restart

  1. the minion shuts down
2016-05-25 21:04:52,364 [salt.cli.daemons ][INFO    ][11430] Setting up the Salt Minion "ch3ll-redhat7"
2016-05-25 21:04:52,364 [salt.cli.daemons ][ERROR   ][11430] Salt minion is already running. Exiting.
None
2016-05-25 21:04:52,365 [salt.cli.daemons ][INFO    ][11430] The salt minion is shutting down..
2016-05-25 21:04:52,365 [salt.cli.daemons ][INFO    ][11430] The Salt Minion is shut down
2016-05-25 21:04:56,116 [salt.scripts     ][ERROR   ][10488] Minion process encountered exception: [Errno 3] No such process

cannot communicate with the master due to the minion shutting down.
I have to restart the minion process twice

Versions Report

[root@ch3ll-redhat7 ~]# salt --versions-report
Salt Version:
           Salt: 2016.3.0

Dependency Versions:
           cffi: Not Installed
       cherrypy: 3.2.2
       dateutil: 1.5
          gitdb: Not Installed
      gitpython: Not Installed
          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.7
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
         pygit2: Not Installed
         Python: 2.7.5 (default, Oct 11 2015, 17:47:16)
   python-gnupg: Not Installed
         PyYAML: 3.10
          PyZMQ: 14.7.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.0.5

System Versions:
           dist: redhat 7.2 Maipo
        machine: x86_64
        release: 3.10.0-327.18.2.el7.x86_64
         system: Linux
        version: Red Hat Enterprise Linux Server 7.2 Maipo

Activity

  1. added
    Packaging
    Platform
    on May 26, 2016
  2. added this to the Approved milestone on May 26, 2016
  3. added
    bug
    P3
    severity-high
    severity-critical
    on May 26, 2016
  4. removed
    severity-critical
    on May 28, 2016
  5. deuscapturus commented on Jun 9, 2016

    @deuscapturus
    Contributor

    I'm in a terrible place after updating my 2015.8.10 minions to 2016.3. The first restart didn't work, and I was unable to perform a second restart remotely from the master.

    Upon looking I couldn't find an official minion upgrade procedure. So I did what has worked in the past pkg.install salt-minion then service.restart salt-minion. What should we be doing?

    I now need to manually recover all of these minions. 😭

    [root@salt-master]# salt 'DOCKER1' service.restart salt-minion
    DOCKER1:
        Passed invalid arguments to service.restart: __init__() got an unexpected keyword argument 'timeout'
    
            Restart the specified service with systemd
    
            CLI Example:
    
            .. code-block:: bash
    
                salt '*' service.restart <service name>
    
    [root@salt-master]# salt 'DOCKER1' cmd.run 'systemctl restart salt-minion'
    DOCKER1:
        Passed invalid arguments to cmd.run: __init__() got an unexpected keyword argument 'bg'
    
            Execute the passed command and return the output as a string
    
            Note that ``env`` represents the environment variables for the command, and
            should be formatted as a dict, or a YAML string which resolves to a dict.
    
            :param str cmd: The command to run. ex: ``ls -lart /home``
    
            :param str cwd: The current working directory to execute the command in,
              defaults to ``/root`` (``C:\`` in windows)
    
  6. wwentland commented on Jun 9, 2016

    @wwentland
    Contributor
  7. Ch3LL commented on Jun 21, 2016

    @Ch3LL
    ContributorAuthor

    @deuscapturus as @BABILEN stated you can use salt-ssh to restart the minion.

    Also there is some docs on how to handle an upgrade here as well.

  8. c4t3l commented on Jun 21, 2016

    @c4t3l

    In my case, a workaround is to utilize the 'at' command similarly to what is described here

    cmd.run:
      - name: |
          echo systemctl restart salt-minion | at now + 1 minute
          echo systemctl restart salt-minion | at now + 2 minutes
    
    pkg.latest:
      - name: salt-minion
      - order: last 
    
  9. sjmh commented on Jul 5, 2016

    @sjmh
    Contributor

    Does this happen on RHEL5/RHEL6? We plan on upgrading to 2016.3, but this would be a big blocker for us doing that.

  10. 10 remaining items

  11. removed this from the C 5 milestone on Aug 2, 2016
  12. plastikos commented on Aug 3, 2016

    @plastikos
    Contributor

    Have any of you tried minion.kill or minion.restart?

  13. modified the milestones: C 5, C 6 on Aug 3, 2016
  14. meggiebot commented on Aug 3, 2016

    @meggiebot

    ZD-828

  15. meggiebot commented on Aug 3, 2016

    @meggiebot

    We believe this is caused by: #33803

    Let's chat early next week about how we want to resolve this

  16. meggiebot commented on Aug 3, 2016

    @meggiebot

    Possibly related to: #22973

  17. deuscapturus commented on Aug 11, 2016

    @deuscapturus
    Contributor

    Another workaround for those running a newer version of systemd.

    salt-minion:
      pkg.latest:
        - name: salt-minion
        - order: last
      cmd.run:
        - name: systemd-run --on-active=30 /usr/bin/systemctl restart salt-minion ; systemd-run --on-active=40 /usr/bin/systemctl restart salt-minion
        - prereq:
          - pkg: salt-minion
    
  18. added
    fixed-pls-verify
    on Aug 17, 2016
  19. terminalmage commented on Aug 17, 2016

    @terminalmage
    Contributor

    Resolved by #35510, also depends on vmware-archive/salt-pack#131 on the packaging end.

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

Metadata

Metadata

Assignees

Labels

P3PackagingPlatformZDZRELEASED - 2015.8.12ZRELEASED - 2016.3.3bugfixed-pls-verifyseverity-high

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions