Merge remote-tracking branch 'upstream/2014.7' into merge-forward-2015.2

Conflicts:
    doc/man/salt.1
    doc/ref/cli/salt.rst
This commit is contained in:
Colton Myers 2015-04-24 10:07:48 -06:00
commit a18e017619
8 changed files with 60 additions and 25 deletions

View File

@ -97,9 +97,10 @@ the started execution and complete.
New in version 0.17. New in version 0.17.
.sp .sp
Choose the format of the state output. The options are \fIfull\fP, Override the configured \fBstate_output\fP value for minion output. One of
\fIterse\fP, \fImixed\fP, \fIchanges\fP, and \fIfilter\fP\&. Default: full \fBfull\fP, \fBterse\fP, \fBmixed\fP, \fBchanges\fP or \fBfilter\fP\&.
.UNINDENT Default: \fBfull\fB\&.
.INDENT 0.0 .INDENT 0.0
.TP .TP
.B \-\-subset=SUBSET .B \-\-subset=SUBSET

View File

@ -46,8 +46,9 @@ Options
.. versionadded:: 0.17 .. versionadded:: 0.17
Choose the format of the state output. The options are `full`, Override the configured ``state_output`` value for minion output. One of
`terse`, `mixed`, `changes`, and `filter`. Default: full ``full``, ``terse``, ``mixed``, ``changes`` or ``filter``. Default:
``full``.
.. option:: --subset=SUBSET .. option:: --subset=SUBSET

View File

@ -122,6 +122,21 @@ Python's :func:`random.shuffle <python2:random.shuffle>` method.
master_shuffle: True master_shuffle: True
.. conf_minion:: retry_dns
``retry_dns``
---------------
Default: ``30``
Set the number of seconds to wait before attempting to resolve
the master hostname if name resolution fails. Defaults to 30 seconds.
Set to zero if the minion should shutdown and not retry.
.. code-block:: yaml
retry_dns: 30
.. conf_minion:: master_port .. conf_minion:: master_port
``master_port`` ``master_port``

View File

@ -5,6 +5,7 @@ After=syslog.target network.target
[Service] [Service]
Type=simple Type=simple
ExecStart=/usr/bin/salt-minion ExecStart=/usr/bin/salt-minion
KillMode=process
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@ -1329,8 +1329,13 @@ class Cloud(object):
if not vm_overrides: if not vm_overrides:
vm_overrides = {} vm_overrides = {}
with salt.utils.fopen(os.path.join(salt.syspaths.CONFIG_DIR, 'cloud'), 'r') as mcc: try:
main_cloud_config = yaml.safe_load(mcc) with salt.utils.fopen(self.opts['conf_file'], 'r') as mcc:
main_cloud_config = yaml.safe_load(mcc)
except KeyError:
main_cloud_config = {}
except IOError:
main_cloud_config = {}
profile_details = self.opts['profiles'][profile] profile_details = self.opts['profiles'][profile]
alias, driver = profile_details['provider'].split(':') alias, driver = profile_details['provider'].split(':')

View File

@ -411,8 +411,15 @@ def status(name, sig=None):
return bool(__salt__['status.pid'](sig)) return bool(__salt__['status.pid'](sig))
cmd = ['service', name, 'status'] cmd = ['service', name, 'status']
if _service_is_upstart(name): if _service_is_upstart(name):
return 'start/running' in __salt__['cmd.run'](cmd, python_shell=False) # decide result base on cmd output, thus ignore retcode,
return not bool(__salt__['cmd.retcode'](cmd, python_shell=False)) # which makes cmd output not at error lvl even when cmd fail.
return 'start/running' in __salt__['cmd.run'](cmd, python_shell=False,
ignore_retcode=True)
# decide result base on retcode, thus ignore output (set quite)
# because there is no way to avoid logging at error lvl when
# service is not running - retcode != 0 (which is totally relevant).
return not bool(__salt__['cmd.retcode'](cmd, python_shell=False,
quite=True))
def _get_service_exec(): def _get_service_exec():

View File

@ -16,20 +16,24 @@ state_verbose:
instruct the highstate outputter to omit displaying anything in green, this instruct the highstate outputter to omit displaying anything in green, this
means that nothing with a result of True and no changes will not be printed means that nothing with a result of True and no changes will not be printed
state_output: state_output:
The highstate outputter has five output modes, `full`, `terse`, `mixed`, The highstate outputter has five output modes, ``full``, ``terse``,
`changes` and `filter`. The default is set to full, which will display many ``mixed``, ``changes`` and ``filter``.
lines of detailed information for each executed chunk. If the `state_output`
option is set to `terse` then the output is greatly simplified and shown in * The default is set to ``full``, which will display many lines of detailed
only one line. If `mixed` is used, then terse output will be used unless a information for each executed chunk.
state failed, in which case full output will be used. If `changes` is used, * If ``terse`` is used, then the output is greatly simplified and shown in
then terse output will be used if there was no error and no changes, only one line.
otherwise full output will be used. If `filter` is used, then either or both * If ``mixed`` is used, then terse output will be used unless a state
of two different filters can be used: `exclude` or `terse`. These can be set failed, in which case full output will be used.
as such from the command line, or in the Salt config as * If ``changes`` is used, then terse output will be used if there was no
`state_output_exclude` or `state_output_terse`, respectively. The values to error and no changes, otherwise full output will be used.
exclude must be a comma-separated list of `True`, `False` and/or `None`. * If ``filter`` is used, then either or both of two different filters can be
Because of parsing nuances, if only one of these is used, it must still used: ``exclude`` or ``terse``.
contain a comma. For instance: `exclude=True,`. These can be set as such from the command line, or in the Salt config as
`state_output_exclude` or `state_output_terse`, respectively. The values to
exclude must be a comma-separated list of `True`, `False` and/or `None`.
Because of parsing nuances, if only one of these is used, it must still
contain a comma. For instance: `exclude=True,`.
state_tabular: state_tabular:
If `state_output` uses the terse output, set this to `True` for an aligned If `state_output` uses the terse output, set this to `True` for an aligned
output format. If you wish to use a custom format, this can be set to a output format. If you wish to use a custom format, this can be set to a

View File

@ -1042,8 +1042,9 @@ class OutputOptionsMixIn(object):
group.add_option( group.add_option(
'--state-output', '--state_output', '--state-output', '--state_output',
default='full', default='full',
help=('Override the configured state_output value for minion output' help=('Override the configured state_output value for minion '
'. Default: full') 'output. One of full, terse, mixed, changes or filter. '
'Default: full.')
) )
for option in self.output_options_group.option_list: for option in self.output_options_group.option_list: