Skip to content

ZeroMQ no longer required when transport is TCP - #29294

Merged
cachedout merged 1 commit into
saltstack:developfrom
skizunov:develop2
Dec 8, 2015
Merged

cachedout merged 1 commit into
saltstack:developfrom
skizunov:develop2

Conversation

@skizunov

@skizunov skizunov commented Dec 1, 2015

Copy link
Copy Markdown
Contributor

salt/master.py:

  • If ZMQ is not importable, use tornado.ioloop.IOLoop as the loop class.
  • Check HAS_ZMQ before using any zmq.* content.
  • Did not touch FloMWorker usage of zmq.*. This is only used when the
    transport is RAET.

salt/minion.py:

  • If ZMQ is not importable, use tornado.ioloop.IOLoop as the loop class.
  • Check HAS_ZMQ before using any zmq.* content.
  • Syndic and MultiSyndic classes still require ZeroMQ.

salt/transport/ipc.py:

  • Added IPCMessagePublisher. This is intended to function much like
    ZMQ's zmq.PUB sockets. Used in implementing utils/event.py to function
    without ZMQ.
  • Added IPCMessageSubscriber. This is intended to function much like
    ZMQ's zmq.SUB sockets. Used in implementing utils/event.py to function
    without ZMQ. What makes this class a bit different is that the associated
    IO Loop is meant to not be running when it is used. Due to this, it is
    recommended that the caller create a new IO Loop for this purpose. The
    reason for this is that the get_event() API may be invoked from
    anywhere, whether or not there is a current IO Loop that is running in
    the thread of the invocation.

salt/utils/async.py:

  • If ZMQ is not importable, use tornado.ioloop.IOLoop as the loop class.

salt/utils/event.py:

  • Implemented using salt.transport.ipc instead of ZMQ.
  • zmq.PUB ==> IPCMessagePublisher
  • zmq.SUB ==> IPCMessageSubscriber
  • zmq.PUSH ==> IPCMessageClient
  • zmq.PULL ==> IPCMessageServer

Signed-off-by: Sergey Kizunov [email protected]

@jfindlay jfindlay added Core relates to code central or existential to Salt Expert Review Needed Transport labels Dec 1, 2015
@cachedout

Copy link
Copy Markdown
Contributor

@skizunov This is great!! Thank you!

There are some minor lint errors and it doesn't look like the tests are running. I'll kick off another test run and also see if I can get them to run locally.

I am also going to cc: @jacksontj and @DmitryKuzmenko for additional review, since I'm sure they'll both want to see this. Thanks for your hard work here. This is really great!

@cachedout cachedout added the pending-discussion The issue or pull request needs more discussion before it can be closed or merged label Dec 1, 2015
@cachedout

Copy link
Copy Markdown
Contributor

Go Go Jenkins!

@skizunov

skizunov commented Dec 1, 2015

Copy link
Copy Markdown
Contributor Author

@cachedout : It looks like there are some failures. Give me some time to fix them. I will let you know when I am done.

@cachedout

Copy link
Copy Markdown
Contributor

@skizunov Sounds great. Thank you very much.

@DmitryKuzmenko

Copy link
Copy Markdown
Contributor

Woot! It's awesome! I'll review the code today.

@skizunov

skizunov commented Dec 2, 2015

Copy link
Copy Markdown
Contributor Author

@cachedout : I think the code is at a point where it has a chance of passing the tests. Are the current test failures due to a problem with the code or a problem with the testing framework?

Admittedly, I am relying on the test framework to test the parts of the code that I don't personally use, such as Syndic.

@DmitryKuzmenko

Copy link
Copy Markdown
Contributor

The code looks great! Thank you @skizunov !

@cachedout

Copy link
Copy Markdown
Contributor

@skizunov This appears to be a legit bug. It doesn't look like the daemons are starting up prior to the test suite beginning.

salt/master.py:
- If ZMQ is not importable, use `tornado.ioloop.IOLoop` as the loop class.
- Check HAS_ZMQ before using any zmq.* content.
- Did not touch `FloMWorker` usage of zmq.*. This is only used when the
transport is RAET.

salt/minion.py:
- If ZMQ is not importable, use `tornado.ioloop.IOLoop` as the loop class.
- Check HAS_ZMQ before using any zmq.* content.

salt/transport/ipc.py:
- Added `IPCMessagePublisher`. This is intended to function much like
ZMQ's zmq.PUB sockets. Used in implementing utils/event.py to function
without ZMQ.
- Added `IPCMessageSubscriber`. This is intended to function much like
ZMQ's zmq.SUB sockets. Used in implementing utils/event.py to function
without ZMQ. What makes this class a bit different is that the associated
IO Loop is meant to not be running when it is used. Due to this, it is
recommended that the caller create a new IO Loop for this purpose. The
reason for this is that the `get_event()` API may be invoked from
anywhere, whether or not there is a current IO Loop that is running in
the thread of the invocation.

salt/utils/async.py:
- If ZMQ is not importable, use `tornado.ioloop.IOLoop` as the loop class.

salt/utils/event.py:
- Implemented using `salt.transport.ipc` instead of ZMQ.
- zmq.PUB ==> `IPCMessagePublisher`
- zmq.SUB ==> `IPCMessageSubscriber`
- zmq.PUSH ==> `IPCMessageClient`
- zmq.PULL ==> `IPCMessageServer`

Signed-off-by: Sergey Kizunov <[email protected]>
@skizunov

skizunov commented Dec 8, 2015

Copy link
Copy Markdown
Contributor Author

@cachedout : The tests seem to be passing now (except for CentOS 6, but I think that is expected). Can we continue the review process?

@cachedout

Copy link
Copy Markdown
Contributor

Great! I will look at this in a few minutes. Thanks, @skizunov

cachedout pushed a commit that referenced this pull request Dec 8, 2015
ZeroMQ no longer required when transport is TCP
@cachedout
cachedout merged commit 87fb8ba into saltstack:develop Dec 8, 2015
rallytime pushed a commit to rallytime/salt that referenced this pull request Jan 13, 2017
…/__init__.py

These options were used back when the event system was based on ZMQ. As of PR
PR saltstack#29294, these options are no longer needed and are obsolete. PR saltstack#29294 changed
the event system transport from ZMQ to TCP/tornado.

There are no other mentions of these configuration options in the salt code base
except in the man pages. Once the man pages are regenerated, those references will
be removed.

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

Labels

Core relates to code central or existential to Salt pending-discussion The issue or pull request needs more discussion before it can be closed or merged Transport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants