Merge pull request #49983 from rallytime/merge-2018.3

[2018.3] Merge forward from 2017.7 to 2018.3
This commit is contained in:
Nicole Thomas 2018-10-11 09:27:34 -04:00 committed by GitHub
commit 8949873b79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 95 additions and 85 deletions

View file

@ -261,24 +261,6 @@
# The publisher interface ZeroMQPubServerChannel
#pub_hwm: 1000
# These two ZMQ HWM settings, salt_event_pub_hwm and event_publisher_pub_hwm
# are significant for masters with thousands of minions. When these are
# insufficiently high it will manifest in random responses missing in the CLI
# and even missing from the job cache. Masters that have fast CPUs and many
# cores with appropriate worker_threads will not need these set as high.
# On deployment with 8,000 minions, 2.4GHz CPUs, 24 cores, 32GiB memory has
# these settings:
#
# salt_event_pub_hwm: 128000
# event_publisher_pub_hwm: 64000
# ZMQ high-water-mark for SaltEvent pub socket
#salt_event_pub_hwm: 20000
# ZMQ high-water-mark for EventPublisher pub socket
#event_publisher_pub_hwm: 10000
# The master may allocate memory per-event and not
# reclaim it.
# To set a high-water mark for memory allocation, use

View file

@ -263,24 +263,6 @@ syndic_user: salt
# The publisher interface ZeroMQPubServerChannel
#pub_hwm: 1000
# These two ZMQ HWM settings, salt_event_pub_hwm and event_publisher_pub_hwm
# are significant for masters with thousands of minions. When these are
# insufficiently high it will manifest in random responses missing in the CLI
# and even missing from the job cache. Masters that have fast CPUs and many
# cores with appropriate worker_threads will not need these set as high.
# On deployment with 8,000 minions, 2.4GHz CPUs, 24 cores, 32GiB memory has
# these settings:
#
# salt_event_pub_hwm: 128000
# event_publisher_pub_hwm: 64000
# ZMQ high-water-mark for SaltEvent pub socket
#salt_event_pub_hwm: 20000
# ZMQ high-water-mark for EventPublisher pub socket
#event_publisher_pub_hwm: 10000
# The master may allocate memory per-event and not
# reclaim it.
# To set a high-water mark for memory allocation, use

View file

@ -1847,40 +1847,6 @@ The listen queue size of the ZeroMQ backlog.
zmq_backlog: 1000
.. conf_master:: salt_event_pub_hwm
.. conf_master:: event_publisher_pub_hwm
``salt_event_pub_hwm`` and ``event_publisher_pub_hwm``
------------------------------------------------------
These two ZeroMQ High Water Mark settings, ``salt_event_pub_hwm`` and
``event_publisher_pub_hwm`` are significant for masters with thousands of
minions. When these are insufficiently high it will manifest in random
responses missing in the CLI and even missing from the job cache. Masters
that have fast CPUs and many cores with appropriate ``worker_threads``
will not need these set as high.
The ZeroMQ high-water-mark for the ``SaltEvent`` pub socket default is:
.. code-block:: yaml
salt_event_pub_hwm: 20000
The ZeroMQ high-water-mark for the ``EventPublisher`` pub socket default is:
.. code-block:: yaml
event_publisher_pub_hwm: 10000
As an example, on single master deployment with 8,000 minions, 2.4GHz CPUs,
24 cores, and 32GiB memory has these settings:
.. code-block:: yaml
salt_event_pub_hwm: 128000
event_publisher_pub_hwm: 64000
.. _master-module-management:
Master Module Management

View file

@ -0,0 +1,6 @@
========================================
In Progress: Salt 2017.7.9 Release Notes
========================================
Version 2017.7.9 is an **unreleased** bugfix release for :ref:`2017.7.0 <release-2017-7-0>`.
This release is still in progress and has not been released yet.

View file

@ -11,7 +11,7 @@ Watch files and translate the changes into salt events
the beacon configuration.
:note: The `inotify` beacon only works on OSes that have `inotify`
kernel support. Currently this excludes FreeBSD, macOS, and Windows.
kernel support.
'''
# Import Python libs

View file

@ -292,6 +292,12 @@ def mod_watch(name, **kwargs):
'''
The at watcher, called to invoke the watch command.
.. note::
This state exists to support special handling of the ``watch``
:ref:`requisite <requisites>`. It should not be called directly.
Parameters for this function should be set by the state being triggered.
name
The name of the atjob

View file

@ -1270,6 +1270,12 @@ def wait_call(name,
def mod_watch(name, **kwargs):
'''
Execute a cmd function based on a watch call
.. note::
This state exists to support special handling of the ``watch``
:ref:`requisite <requisites>`. It should not be called directly.
Parameters for this function should be set by the state being triggered.
'''
if kwargs['sfun'] in ('wait', 'run', 'watch'):
if kwargs.get('stateful'):

View file

@ -2572,6 +2572,15 @@ def mod_run_check(onlyif, unless, creates):
def mod_watch(name, sfun=None, **kwargs):
'''
The docker_container watcher, called to invoke the watch command.
.. note::
This state exists to support special handling of the ``watch``
:ref:`requisite <requisites>`. It should not be called directly.
Parameters for this function should be set by the state being triggered.
'''
if sfun == 'running':
watch_kwargs = copy.deepcopy(kwargs)
if watch_kwargs.get('watch_action', 'force') == 'force':

View file

@ -503,6 +503,15 @@ def absent(name=None, images=None, force=False):
def mod_watch(name, sfun=None, **kwargs):
'''
The docker_image watcher, called to invoke the watch command.
.. note::
This state exists to support special handling of the ``watch``
:ref:`requisite <requisites>`. It should not be called directly.
Parameters for this function should be set by the state being triggered.
'''
if sfun == 'present':
# Force image to be updated
kwargs['force'] = True

View file

@ -334,7 +334,14 @@ def wait_rm(name, recurse=False, profile=None, **kwargs):
def mod_watch(name, **kwargs):
'''
Execute a etcd function based on a watch call requisite.
The etcd watcher, called to invoke the watch command.
When called, execute a etcd function based on a watch call requisite.
.. note::
This state exists to support special handling of the ``watch``
:ref:`requisite <requisites>`. It should not be called directly.
Parameters for this function should be set by the state being triggered.
'''
# Watch to set etcd key

View file

@ -931,6 +931,12 @@ def mod_watch(name, user=None, **kwargs):
'''
The mounted watcher, called to invoke the watch command.
.. note::
This state exists to support special handling of the ``watch``
:ref:`requisite <requisites>`. It should not be called directly.
Parameters for this function should be set by the state being triggered.
name
The name of the mount point

View file

@ -3258,6 +3258,12 @@ def mod_aggregate(low, chunks, running):
def mod_watch(name, **kwargs):
'''
Install/reinstall a package based on a watch requisite
.. note::
This state exists to support special handling of the ``watch``
:ref:`requisite <requisites>`. It should not be called directly.
Parameters for this function should be set by the state being triggered.
'''
sfun = kwargs.pop('sfun', None)
mapfun = {'purged': purged,

View file

@ -3,10 +3,10 @@
Starting or restarting of services and daemons
==============================================
Services are defined as system daemons typically started with system init or
rc scripts. The service state uses whichever service module that is loaded on
the minion with the virtualname of ``service``. Services can be defined as
running or dead.
Services are defined as system daemons and are typically launched using system
init or rc scripts. This service state uses whichever service module is loaded
on the minion with the virtualname of ``service``. Services can be defined as
either running or dead.
If you need to know if your init system is supported, see the list of supported
:mod:`service modules <salt.modules.service.py>` for your desired init system
@ -30,7 +30,7 @@ section of Salt's module documentation to work around possible errors.
httpd:
service.running: []
The service can also be set to be started at runtime via the enable option:
The service can also be set to start at runtime via the enable option:
.. code-block:: yaml
@ -39,8 +39,8 @@ The service can also be set to be started at runtime via the enable option:
- enable: True
By default if a service is triggered to refresh due to a watch statement the
service is by default restarted. If the desired behavior is to reload the
service, then set the reload value to True:
service is restarted. If the desired behavior is to reload the service, then
set the reload value to True:
.. code-block:: yaml
@ -832,6 +832,14 @@ def mod_watch(name,
**kwargs):
'''
The service watcher, called to invoke the watch command.
When called, it will restart or reload the named service.
.. note::
This state exists to support special handling of the ``watch``
:ref:`requisite <requisites>`. It should not be called directly.
Parameters for this function should be set by the watching service.
(i.e. ``service.running``)
name
The name of the init or rc script used to manage the service
@ -844,11 +852,13 @@ def mod_watch(name,
The string to search for when looking for the service process with ps
reload
Use reload instead of the default restart (exclusive option with full_restart,
defaults to reload if both are used)
When set, reload the service instead of restarting it.
(i.e. ``service nginx reload``)
full_restart
Use service.full_restart instead of restart (exclusive option with reload)
Perform a full stop/start of a service by passing ``--full-restart``.
This option is ignored if ``reload`` is set and is supported by only a few
:py:func:`service modules <salt.modules.service>`.
force
Use service.force_reload instead of reload (needs reload to be set to True)

View file

@ -361,7 +361,16 @@ def mod_watch(name,
conf_file=None,
bin_env=None,
**kwargs):
# Always restart on watch
'''
The supervisord watcher, called to invoke the watch command.
Always restart on watch
.. note::
This state exists to support special handling of the ``watch``
:ref:`requisite <requisites>`. It should not be called directly.
Parameters for this function should be set by the state being triggered.
'''
return running(
name,
restart=restart,

View file

@ -272,8 +272,14 @@ def wait(name, url='http://localhost:8080/manager', timeout=180):
def mod_watch(name, url='http://localhost:8080/manager', timeout=180):
'''
The tomcat watcher function.
When called it will reload the webapp in question
The tomcat watcher, called to invoke the watch command.
When called, it will reload the webapp in question
.. note::
This state exists to support special handling of the ``watch``
:ref:`requisite <requisites>`. It should not be called directly.
Parameters for this function should be set by the state being triggered.
'''
msg = __salt__['tomcat.reload'](name, url, timeout)