mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge branch '2016.3' into '2016.11'
No conflict.
This commit is contained in:
commit
5940db5b3f
6 changed files with 33 additions and 4 deletions
|
@ -852,6 +852,10 @@
|
|||
# order will be used.
|
||||
#syndic_failover: random
|
||||
|
||||
# The number of seconds for the salt client to wait for additional syndics to
|
||||
# check in with their lists of expected minions before giving up.
|
||||
#syndic_wait: 5
|
||||
|
||||
|
||||
##### Peer Publish settings #####
|
||||
##########################################
|
||||
|
|
|
@ -3143,6 +3143,20 @@ order will be used.
|
|||
|
||||
syndic_failover: random
|
||||
|
||||
.. conf_master:: syndic_wait
|
||||
|
||||
``syndic_wait``
|
||||
---------------
|
||||
|
||||
Default: ``5``
|
||||
|
||||
The number of seconds for the salt client to wait for additional syndics to
|
||||
check in with their lists of expected minions before giving up.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
syndic_wait: 5
|
||||
|
||||
|
||||
Peer Publish Settings
|
||||
=====================
|
||||
|
|
|
@ -168,6 +168,16 @@ daemon until the data reaches the Master or Syndic node that issued the command.
|
|||
Syndic wait
|
||||
===========
|
||||
|
||||
``syndic_wait`` is a master configuration file setting that specifies the number of
|
||||
seconds the Salt client should wait for additional syndics to check in with their
|
||||
lists of expected minions before giving up. This value defaults to ``5`` seconds.
|
||||
|
||||
The ``syndic_wait`` setting is necessary because the higher-level master does not
|
||||
have a way of knowing which minions are below the syndics. The higher-level master
|
||||
has its own list of expected minions and the masters below them have their own lists
|
||||
as well, so the Salt client does not how long to wait for all returns. The
|
||||
``syndic_wait`` option allows time for all minions to return to the Salt client.
|
||||
|
||||
.. note::
|
||||
|
||||
To reduce the amount of time the CLI waits for Minions to respond, install
|
||||
|
|
|
@ -255,6 +255,7 @@ def list_(narrow=None,
|
|||
cmd.extend(['-source', source])
|
||||
if local_only:
|
||||
cmd.extend(['-localonly'])
|
||||
cmd.extend(['-limitoutput'])
|
||||
|
||||
result = __salt__['cmd.run_all'](cmd, python_shell=False)
|
||||
|
||||
|
@ -264,7 +265,7 @@ def list_(narrow=None,
|
|||
raise CommandExecutionError(err)
|
||||
|
||||
ret = {}
|
||||
pkg_re = re.compile(r'(\S+)\s+(\S+)')
|
||||
pkg_re = re.compile(r'(\S+)\|(\S+)')
|
||||
for line in result['stdout'].split('\n'):
|
||||
if line.startswith("No packages"):
|
||||
return ret
|
||||
|
|
|
@ -182,7 +182,7 @@ def send_msg_multi(message,
|
|||
password = creds.get('xmpp.password')
|
||||
|
||||
xmpp = SendMsgBot.create_multi(
|
||||
jid, password, message, recipients=recipients, rooms=rooms)
|
||||
jid, password, message, recipients=recipients, rooms=rooms, nick=nick)
|
||||
|
||||
if rooms:
|
||||
xmpp.register_plugin('xep_0045') # MUC plugin
|
||||
|
|
|
@ -86,7 +86,7 @@ def installed(name, version=None, source=None, force=False, pre_versions=False,
|
|||
'comment': ''}
|
||||
|
||||
# Determine if the package is installed
|
||||
if name not in __salt__['cmd.run']('choco list --local-only'):
|
||||
if name not in __salt__['cmd.run']('choco list --local-only --limit-output'):
|
||||
ret['changes'] = {'name': '{0} will be installed'.format(name)}
|
||||
elif force:
|
||||
ret['changes'] = {'name': '{0} is already installed but will reinstall'
|
||||
|
@ -166,7 +166,7 @@ def uninstalled(name, version=None, uninstall_args=None, override_args=False):
|
|||
'comment': ''}
|
||||
|
||||
# Determine if package is installed
|
||||
if name in __salt__['cmd.run']('choco list --local-only'):
|
||||
if name in __salt__['cmd.run']('choco list --local-only --limit-output'):
|
||||
ret['changes'] = {'name': '{0} will be removed'.format(name)}
|
||||
else:
|
||||
ret['comment'] = 'The package {0} is not installed'.format(name)
|
||||
|
|
Loading…
Add table
Reference in a new issue