Merge pull request #38324 from rallytime/merge-2016.11

[2016.11] Merge forward from 2016.3 to 2016.11
This commit is contained in:
Mike Place 2016-12-18 05:30:25 -07:00 committed by GitHub
commit 5bd7471e30
6 changed files with 33 additions and 4 deletions

View file

@ -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 #####
##########################################

View file

@ -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
=====================

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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)