Skip to content

[2015.5] Multi-Master Minions Block on Authentication #21744

Closed

Description

@rallytime

When setting up multi-master on the HEAD of the 2015.2 branch, when the minion starts, the minion will block until it authenticates with the first master in the minion's list of masters. Once that auth has taken place, it will then block on the authentication of the second master, and so on (if more than two).

This is a regression in behavior since 2014.7 (and, after testing on the HEAD of 2014.7, is not an issue there). In 2014.7, the minion would try to auth with both masters, before eventually settling on whichever masters were up after a number of iterations (see #17032).

The blocking behavior causes several problems with multi-master:

  1. When the minion is started and the 1st master is up but the second master is down, the minion auths with the first master and then blocks. The 1st master, which is running, cannot send commands to the minion(s), because the minions aren't receiving the event, processing it, and sending returns. The CLI on the master says "Minion did not return. [No response]".
  2. When the minion is started and the 2nd master is up but the 1st master is down, the minion blocks on authing to the first master. Commands can't be sent from the 2nd master to the minion(s) because the minions haven't authenticated and are not receiving events.

ping @cachedout

Activity

  1. added
    bug
    severity-critical
    on Mar 17, 2015
  2. added this to the Lithium milestone on Mar 17, 2015
  3. added
    Regression
    on Mar 17, 2015
  4. added
    fixed-pls-verify
    on Mar 19, 2015
  5. rallytime commented on Mar 19, 2015

    @rallytime
    ContributorAuthor

    I can still reproduce this problem on my testing setup and it doesn't appear fixed. @cachedout Let's look at this again and see if I am just missing something.

  6. removed
    fixed-pls-verify
    on Mar 19, 2015
  7. cachedout commented on Mar 20, 2015

    @cachedout
    Contributor

    This does work but only if auth_retry and auth_timeout are dialed down from their original defaults. However, that has other (potentially serious) side effects, especially at scale.

  8. added
    severity-medium
    and removed
    severity-critical
    on Mar 20, 2015
  9. modified the milestones: Approved, Lithium on Mar 20, 2015
  10. added
    Core
    on Apr 8, 2015
  11. 23 remaining items

  12. plastikos commented on Oct 23, 2015

    @plastikos
    Contributor

    Hmmm. I'd like to watch the internals of libzmq with my instrumented version to see what is going on. Unfortunately I'm not sure when I'd set those tests up. Do you have a nice, contained test for this?

  13. cachedout commented on Oct 23, 2015

    @cachedout
    Contributor

    @plastikos The steps to reproduce it are in the comment I left above: #21744 (comment). All that's needed is a single master and a single minion.

  14. DmitryKuzmenko commented on Oct 23, 2015

    @DmitryKuzmenko
    Contributor

    My 5 cents: ZeroMQ workflow have to be the following:

    • create context
    • create socket
    • work until get shutdown signal
    • workers:
      • set socket linger
      • close socket
    • master:
      • wait workers
      • terminate context

    Here it looks we haven't close a socket somewhere.

  15. DmitryKuzmenko commented on Oct 26, 2015

    @DmitryKuzmenko
    Contributor

    Caught it!
    As I said we don't close the ZeroMQ socket. Will review all the zeromq transport layer and send PR in an hour or two.

  16. cachedout commented on Oct 26, 2015

    @cachedout
    Contributor

    @DmitryKuzmenko Great! As you probably say in my comments, calling destroy() on the context will force-close the socket(s) but you may have an approach which is more selective. Looking forward to seeing what you come up with.

  17. DmitryKuzmenko commented on Oct 26, 2015

    @DmitryKuzmenko
    Contributor

    Checked other zeromq channels, AsyncZeroMQPubChannel is the only one who doesn't close it's socket in some cases: when stream was never created.

  18. added
    fixed-pls-verify
    on Oct 26, 2015
  19. cachedout commented on Oct 26, 2015

    @cachedout
    Contributor

    @Ch3LL Please see if you can verify the fix from @DmitryKuzmenko and we'll get this closed.

  20. Ch3LL commented on Oct 27, 2015

    @Ch3LL
    Contributor

    Forgot to update this thread. Tests passed in 2015.8.0. :)

  21. DmitryKuzmenko commented on Oct 27, 2015

    @DmitryKuzmenko
    Contributor

    Yes! Thank you @Ch3LL !

  22. Ch3LL commented on Dec 4, 2015

    @Ch3LL
    Contributor

    @usernkey only active-active (master_type: str)

  23. Ch3LL commented on Dec 4, 2015

    @Ch3LL
    Contributor

    @usernkey its definitely on our radar. There's a couple issues opened for multi-master failover that you can track here: #24243 #27152

    Please confirm you are seeing the same problems reported in those issues. Thanks

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

Metadata

Metadata

Assignees

Labels

CoreMulti-MasterP1RegressionZDbugfixed-pls-verifyseverity-medium

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions