__process_multiprocessing_logging_queue:
- A leak was observed in this process on Windows. On Windows, creating a
new process doesn't fork (copy the parent process image). Due to this, we
need to setup extended logging inside this process. The leak was due to
the temp null and temp logging handlers being active which just store
messages but don't process them. Setting up extended logging removes
those handlers and fixes the leak (as well as properly dealing with
incoming logging messages).
setup_multiprocessing_logging:
- A leak was obversed in processes that used this on Windows. Similar
to above, due to lack of fork, the new process will have the temp null
and temp logging handlers enabled, causing the leak. In this function,
removing those handlers prevents the leak.
Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
In relation to #25293, it solves the improbable case where the OS returns the
mount options as names instead of numeric ids. The module converts these names
to numeric ids before returning the opts.
This is done only for uid= and gid= opts, for now. It can be extended to others.
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 <sergey.kizunov@ni.com>
This change is an implementation for managing commented cron jobs.
Before that, commented cron jobs were not manageable by salt. They were ignored
at reading, and thus lost while writing the new crontab.
This is described in issue #29082, which should be fixed now.
There is a new `commented` parameter, defaulting to False. The cron job is
set like any other, but is prefixed by `#DISABLED#`.