mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #35859 from rallytime/merge-2016.3
[2016.3] Merge forward from 2015.8 to 2016.3
This commit is contained in:
commit
96747bc3bb
4 changed files with 18 additions and 12 deletions
|
@ -1165,8 +1165,6 @@ enabled and can be disabled by changing this value to ``False``.
|
|||
``environment``
|
||||
---------------
|
||||
|
||||
Default: ``None``
|
||||
|
||||
Normally the minion is not isolated to any single environment on the master
|
||||
when running states, but the environment can be isolated on the minion side
|
||||
by statically setting it. Remember that the recommended way to manage
|
||||
|
@ -1181,14 +1179,22 @@ environments is to isolate via the top file.
|
|||
``state_top_saltenv``
|
||||
---------------------
|
||||
|
||||
Default: not set
|
||||
This option has no default value. Set it to an environment name to ensure that
|
||||
*only* the top file from that environment is considered during a
|
||||
:ref:`highstate <running-highstate>`.
|
||||
|
||||
Set this option to an environment name, to ensure that *only* the top file from
|
||||
that environment is considered during a :ref:`highstate <running-highstate>`.
|
||||
.. note::
|
||||
Using this value does not change the merging strategy. For instance, if
|
||||
:conf_minion:`top_file_merging_strategy` is left at its default, and
|
||||
:conf_minion:`state_top_saltenv` is set to ``foo``, then any sections for
|
||||
environments other than ``foo`` in the top file for the ``foo`` environment
|
||||
will be ignored. With :conf_minion:`top_file_merging_strategy` set to
|
||||
``base``, all states from all environments in the ``base`` top file will
|
||||
be applied, while all other top files are ignored.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
state_top_saltenv: base
|
||||
state_top_saltenv: dev
|
||||
|
||||
.. conf_minion:: top_file_merging_strategy
|
||||
|
||||
|
|
|
@ -437,9 +437,8 @@ Scenario 2 - No Environment Specified, :conf_minion:`top_file_merging_strategy`
|
|||
In this scenario, assuming that the ``base`` environment's top file was
|
||||
evaluated first, the ``base1``, ``dev1``, and ``qa1`` states would be applied
|
||||
to all minions. If, for instance, the ``qa`` environment is not defined in
|
||||
**/srv/salt/base/top.sls**, then the ``qa`` section in
|
||||
**/srv/salt/dev/top.sls** would be used and the ``qa2`` states would be applied
|
||||
to all minions.
|
||||
**/srv/salt/base/top.sls**, then because there is no top file for the ``qa``
|
||||
environment, no states from the ``qa`` environment would be applied.
|
||||
|
||||
Scenario 3 - No Environment Specified, :conf_minion:`top_file_merging_strategy` is "same"
|
||||
-----------------------------------------------------------------------------------------
|
||||
|
|
|
@ -1107,11 +1107,12 @@ ARGS = {10}\n'''.format(self.minion_config,
|
|||
if not self.tty:
|
||||
# If RSTR is not seen in both stdout and stderr then there
|
||||
# was a thin deployment problem.
|
||||
return 'ERROR: Failure deploying thin: {0}\n{1}'.format(stdout, stderr), stderr, retcode
|
||||
log.error('ERROR: Failure deploying thin, retrying: {0}\n{1}'.format(stdout, stderr), stderr, retcode)
|
||||
return self.cmd_block()
|
||||
elif not re.search(RSTR_RE, stdout):
|
||||
# If RSTR is not seen in stdout with tty, then there
|
||||
# was a thin deployment problem.
|
||||
return 'ERROR: Failure deploying thin: {0}\n{1}'.format(stdout, stderr), stderr, retcode
|
||||
log.error('ERROR: Failure deploying thin, retrying: {0}\n{1}'.format(stdout, stderr), stderr, retcode)
|
||||
while re.search(RSTR_RE, stdout):
|
||||
stdout = re.split(RSTR_RE, stdout, 1)[1].strip()
|
||||
if self.tty:
|
||||
|
|
|
@ -1343,7 +1343,7 @@ def list_nodes_min(kwargs=None, call=None):
|
|||
vm_list = salt.utils.vmware.get_mors_with_properties(_get_si(), vim.VirtualMachine, vm_properties)
|
||||
|
||||
for vm in vm_list:
|
||||
ret[vm["name"]] = True
|
||||
ret[vm['name']] = {'state': 'Running', 'id': vm['name']}
|
||||
|
||||
return ret
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue