Skip to content

2015.8.0: salt-minion failover broken. Hangs forever when connecting to the second failover #27152

Closed

Description

@hubez

Configure salt minion as:

master_type: failover
master:
  - 192.168.0.9
  - 192.168.0.10

Shutdown salt-master on 192.168.0.9.
Start salt-master on 192.168.0.10.

Run salt minion

# salt-minion -l debug
...
[WARNING ] Master ip address changed from 192.168.0.9 to 192.168.0.10
[DEBUG   ] Initializing new SAuth for ('/etc/salt/pki/minion', '192.168.0.10', 'tcp://192.168.0.10:4506')
[DEBUG   ] Generated random reconnect delay between '1000ms' and '11000ms' (9595)
[DEBUG   ] Setting zmq_reconnect_ivl to '9595ms'
[DEBUG   ] Setting zmq_reconnect_ivl_max to '11000ms'

And it will just hang there indefinitely. Funny thing is if you hit CTRL-C, it'll unstuck it.

^CException KeyboardInterrupt in <bound method AsyncZeroMQPubChannel.__del__ of <salt.transport.zeromq.AsyncZeroMQPubChannel object at 0x1acbb90>> ignored
[DEBUG   ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/minion', '192.168.0.10', 'tcp://192.168.0.10:4506', 'clear')
[DEBUG   ] Decrypting the current master AES key
[DEBUG   ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG   ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG   ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/minion', '192.168.0.10', 'tcp://192.168.0.10:4506', 'aes')
[DEBUG   ] Re-using SAuth for ('/etc/salt/pki/minion', '192.168.0.10', 'tcp://192.168.0.10:4506')
[DEBUG   ] Loaded minion key: /etc/salt/pki/minion/minion.pem
...

and it will function properly.

I'm hoping this is high priority, this completely breaks multi-master failover topology. Anyone know any workarounds?

Thanks

Activity

  1. added
    bug
    severity-medium
    P1
    Core
    severity-high
    and removed
    severity-medium
    on Sep 16, 2015
  2. added this to the Approved milestone on Sep 16, 2015
  3. jfindlay commented on Sep 16, 2015

    @jfindlay
    Contributor

    @hubez, thanks for the report. There is no workaround that I know of at this point. This could be related to #24243.

  4. russ-blaisdell commented on Sep 21, 2015

    @russ-blaisdell

    I have seen the same on RHEL7. Tried many installs with 2015.8.0 and all have the same issue. The same setup on UBUNTU 14 fails as well

  5. Ch3LL commented on Nov 9, 2015

    @Ch3LL
    Contributor

    @hubez just for clarification have you setup your multi-master setup following these instructions: https://docs.saltstack.com/en/latest/topics/tutorials/multimaster_pki.html . I am trying to replicate your issue and I need to know if you setup the PKI settings because you stated your minion file only includes the failover and list of masters in the file.

    There has been some changes for multi master represented in this PR: #28302 which fixed this issue: #21744 and I hope to determine if these changes will fix this issue. Although this issue does not include the failover option so I want to test your exact settings to ensure if this PR does fix the issue or not and then I will update this issue with the results.

  6. hubez commented on Nov 12, 2015

    @hubez
    Author

    @Ch3LL I did a simpler setup. I followed: https://docs.saltstack.com/en/latest/topics/tutorials/multimaster.html

    I have open authentication where the master will accept any minion connecting.
    And I give both my servers the same private keys by just copying them.

  7. Ch3LL commented on Nov 12, 2015

    @Ch3LL
    Contributor

    @hubez thanks for the additional information. I tested on the head of 2015.8 which includes the fix for multi master and I am still seeing the same issue, but some differences in your initial issue report. So unfortunately it appears there is a bug in failover multi-master.

    Here is my output form salt-minion -l debug:

    [DEBUG   ] sync_connect_master
    [INFO    ] Got list of available master addresses: ['45.79.106.92', '45.33.39.38']
    [DEBUG   ] Initializing new SAuth for ('/etc/salt/pki/minion', '45.33.39.100', 'tcp://45.79.106.92:4506')
    [DEBUG   ] Generated random reconnect delay between '1000ms' and '11000ms' (5845)
    [DEBUG   ] Setting zmq_reconnect_ivl to '5845ms'
    [DEBUG   ] Setting zmq_reconnect_ivl_max to '11000ms'
    [DEBUG   ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/minion', '45.33.39.100', 'tcp://45.79.106.92:4506', 'clear')
    

    As shown above my salt-minion process on the head of 2015.8 gets stuck at Initializing new AsyncZeroMQReqChannel not Setting zmq_reconnect* Another difference is if I try to select CTRL+C as you explained it just exits out of the minion process and does not get unstuck.

    @cachedout looks like the master to master failover has a similar bug to just the normal master to master setup, even while testing on the head of 2015.8 with the new fix.

  8. syedaali commented on Nov 13, 2015

    @syedaali

    I am encountering a similar problem but I have a single master, the minion hangs randomly.

    root@ip:# service salt-minion stop
    salt-minion stop/waiting
    root@ip:
    # salt-call state.highstate -l debug
    [DEBUG ] Reading configuration from /etc/salt/minion
    [DEBUG ] Including configuration from '/etc/salt/minion.d/_schedule.conf'
    [DEBUG ] Reading configuration from /etc/salt/minion.d/_schedule.conf
    [DEBUG ] Configuration file path: /etc/salt/minion
    [WARNING ] Insecure logging configuration detected! Sensitive data may be logged.
    [DEBUG ] Reading configuration from /etc/salt/minion
    [DEBUG ] Including configuration from '/etc/salt/minion.d/_schedule.conf'
    [DEBUG ] Reading configuration from /etc/salt/minion.d/_schedule.conf
    [DEBUG ] Please install 'virt-what' to improve results of the 'virtual' grain.
    [DEBUG ] Initializing new SAuth for ('/etc/salt/pki/minion', 'dashboard1-test', 'tcp://X.X.X.X:4506')
    [DEBUG ] Generated random reconnect delay between '1000ms' and '11000ms' (5364)
    [DEBUG ] Setting zmq_reconnect_ivl to '5364ms'
    [DEBUG ] Setting zmq_reconnect_ivl_max to '11000ms'
    [DEBUG ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/minion', 'dashboard1-test', 'tcp://X.X.X.X:4506', 'aes')
    [DEBUG ] Initializing new SAuth for ('/etc/salt/pki/minion', 'dashboard1-test', 'tcp://X.X.X.X:4506')
    [DEBUG ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/minion', 'dashboard1-test', 'tcp://X.X.X.X:4506', 'clear')

  9. cachedout commented on Nov 23, 2015

    @cachedout
    Contributor

    @syedaali This issue is specifically about multi-master installations. If you're seeing this on a single-master, could you please open that as a separate bug so that we can keep track of each independently? Thanks.

  10. self-assigned this
    on Dec 4, 2015
  11. basepi commented on Jan 7, 2016

    @basepi
    Contributor

    I think this is a duplicate of #24243. I'm going to close this one and we can follow up there.

  12. added
    Duplicate
    on Jan 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

CoreDuplicateMulti-MasterP1bugseverity-high

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions