mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Merge pull request #33241 from rallytime/merge-develop
[develop] Merge forward from 2016.3 to develop
This commit is contained in:
commit
bfd4bb6c47
@ -2,7 +2,7 @@
|
||||
Salt 2015.5.11 Release Notes
|
||||
============================
|
||||
|
||||
Version 2015.5.6 is a bugfix release for :doc:`2015.5.0
|
||||
Version 2015.5.11 is a bugfix release for :doc:`2015.5.0
|
||||
</topics/releases/2015.5.0>`.
|
||||
|
||||
Changes for v2015.5.10..v2015.5.11
|
||||
@ -10,12 +10,20 @@ Changes for v2015.5.10..v2015.5.11
|
||||
|
||||
Extended changelog courtesy of Todd Stansell (https://github.com/tjstansell/salt-changelogs):
|
||||
|
||||
*Generated at: 2016-05-11T00:06:35Z*
|
||||
*Generated at: 2016-05-12T10:50:20Z*
|
||||
|
||||
Total Merges: **98**
|
||||
|
||||
Changes:
|
||||
|
||||
* 09b072a Fix file.managed for Windows (`#33181`_)
|
||||
|
||||
* 30868ab [2015.5] Update to latest bootstrap script v2016.05.11 (`#33185`_)
|
||||
|
||||
* 264ad34 Pip fix (`#33180`_)
|
||||
|
||||
* 43288b2 add 2015.5.11 release notes (`#33160`_)
|
||||
|
||||
* e0da8fd [2015.5] Update to latest bootstrap script v2016.05.10 (`#33155`_)
|
||||
|
||||
- **PR** `#33141`_: (*jtand*) Skipping salt-call --local test
|
||||
@ -390,3 +398,7 @@ Changes:
|
||||
.. _`#33132`: https://github.com/saltstack/salt/pull/33132
|
||||
.. _`#33141`: https://github.com/saltstack/salt/pull/33141
|
||||
.. _`#33155`: https://github.com/saltstack/salt/pull/33155
|
||||
.. _`#33160`: https://github.com/saltstack/salt/pull/33160
|
||||
.. _`#33180`: https://github.com/saltstack/salt/pull/33180
|
||||
.. _`#33181`: https://github.com/saltstack/salt/pull/33181
|
||||
.. _`#33185`: https://github.com/saltstack/salt/pull/33185
|
||||
|
@ -10,12 +10,16 @@ Changes for v2015.8.8..v2015.8.9
|
||||
|
||||
Extended changelog courtesy of Todd Stansell (https://github.com/tjstansell/salt-changelogs):
|
||||
|
||||
*Generated at: 2016-05-11T00:31:08Z*
|
||||
*Generated at: 2016-05-12T10:57:59Z*
|
||||
|
||||
Total Merges: **139**
|
||||
Total Merges: **140**
|
||||
|
||||
Changes:
|
||||
|
||||
- **PR** `#33188`_: (*rallytime*) [2015.8] Merge forward from 2015.5 to 2015.8
|
||||
|
||||
* e9108e0 add 2015.8.9 release notes (`#33161`_)
|
||||
|
||||
* 2d9919e [2015.8] Update to latest bootstrap script v2016.05.10 (`#33156`_)
|
||||
|
||||
* 033bef2 Hash fileclients by opts (`#33142`_)
|
||||
@ -680,4 +684,10 @@ Changes:
|
||||
.. _`#33141`: https://github.com/saltstack/salt/pull/33141
|
||||
.. _`#33142`: https://github.com/saltstack/salt/pull/33142
|
||||
.. _`#33144`: https://github.com/saltstack/salt/pull/33144
|
||||
.. _`#33155`: https://github.com/saltstack/salt/pull/33155
|
||||
.. _`#33156`: https://github.com/saltstack/salt/pull/33156
|
||||
.. _`#33160`: https://github.com/saltstack/salt/pull/33160
|
||||
.. _`#33161`: https://github.com/saltstack/salt/pull/33161
|
||||
.. _`#33180`: https://github.com/saltstack/salt/pull/33180
|
||||
.. _`#33185`: https://github.com/saltstack/salt/pull/33185
|
||||
.. _`#33188`: https://github.com/saltstack/salt/pull/33188
|
||||
|
@ -2698,7 +2698,11 @@ def queue_instances(instances):
|
||||
'''
|
||||
for instance_id in instances:
|
||||
node = _get_node(instance_id=instance_id)
|
||||
salt.utils.cloud.cache_node(node, __active_provider_name__, __opts__)
|
||||
for name in node:
|
||||
if instance_id == node[name]['instanceId']:
|
||||
salt.utils.cloud.cache_node(node[name],
|
||||
__active_provider_name__,
|
||||
__opts__)
|
||||
|
||||
|
||||
def create_attach_volumes(name, kwargs, call=None, wait_to_finish=True):
|
||||
@ -3247,7 +3251,10 @@ def show_instance(name=None, instance_id=None, call=None, kwargs=None):
|
||||
)
|
||||
|
||||
node = _get_node(name=name, instance_id=instance_id)
|
||||
salt.utils.cloud.cache_node(node, __active_provider_name__, __opts__)
|
||||
for name in node:
|
||||
salt.utils.cloud.cache_node(node[name],
|
||||
__active_provider_name__,
|
||||
__opts__)
|
||||
return node
|
||||
|
||||
|
||||
|
@ -85,9 +85,7 @@ def __virtual__():
|
||||
'''
|
||||
Confirm this module is on a Debian based system
|
||||
'''
|
||||
if __grains__.get('os_family', False) == 'Kali':
|
||||
return __virtualname__
|
||||
elif __grains__.get('os_family', False) == 'Debian':
|
||||
if __grains__.get('os_family') in ('Kali', 'Debian', 'LinuxMint'):
|
||||
return __virtualname__
|
||||
elif __grains__.get('os_family', False) == 'Cumulus':
|
||||
return __virtualname__
|
||||
|
@ -491,6 +491,10 @@ def _run(cmd,
|
||||
return ret
|
||||
|
||||
out, err = proc.stdout, proc.stderr
|
||||
if err is None:
|
||||
# Will happen if redirect_stderr is True, since stderr was sent to
|
||||
# stdout.
|
||||
err = ''
|
||||
|
||||
if rstrip:
|
||||
if out is not None:
|
||||
|
@ -248,9 +248,9 @@ def _git_run(command, cwd=None, runas=None, identity=None,
|
||||
if result['retcode'] == 0:
|
||||
return result
|
||||
else:
|
||||
stderr = \
|
||||
salt.utils.url.redact_http_basic_auth(result['stderr'])
|
||||
errors.append(stderr)
|
||||
err = result['stdout' if redirect_stderr else 'stderr']
|
||||
if err:
|
||||
errors.append(salt.utils.url.redact_http_basic_auth(err))
|
||||
|
||||
# We've tried all IDs and still haven't passed, so error out
|
||||
if failhard:
|
||||
@ -291,9 +291,10 @@ def _git_run(command, cwd=None, runas=None, identity=None,
|
||||
msg = 'Command \'{0}\' failed'.format(
|
||||
salt.utils.url.redact_http_basic_auth(gitcommand)
|
||||
)
|
||||
if result['stderr']:
|
||||
err = result['stdout' if redirect_stderr else 'stderr']
|
||||
if err:
|
||||
msg += ': {0}'.format(
|
||||
salt.utils.url.redact_http_basic_auth(result['stderr'])
|
||||
salt.utils.url.redact_http_basic_auth(err)
|
||||
)
|
||||
raise CommandExecutionError(msg)
|
||||
return result
|
||||
|
@ -31,7 +31,6 @@ import sys # do not remove, used in imported file.py functions
|
||||
import fileinput # do not remove, used in imported file.py functions
|
||||
import fnmatch # do not remove, used in imported file.py functions
|
||||
import mmap # do not remove, used in imported file.py functions
|
||||
from salt.ext.six import string_types # do not remove, used in imported file.py functions
|
||||
# do not remove, used in imported file.py functions
|
||||
import salt.ext.six as six # pylint: disable=import-error,no-name-in-module
|
||||
from salt.ext.six.moves.urllib.parse import urlparse as _urlparse # pylint: disable=import-error,no-name-in-module
|
||||
|
@ -269,6 +269,10 @@ def ext_pillar(minion_id, repo, pillar_dirs):
|
||||
opts['__git_pillar'] = True
|
||||
pillar = salt.utils.gitfs.GitPillar(opts)
|
||||
pillar.init_remotes(repo, PER_REMOTE_OVERRIDES)
|
||||
if __opts__.get('__role') == 'minion':
|
||||
# If masterless, fetch the remotes. We'll need to remove this once
|
||||
# we make the minion daemon able to run standalone.
|
||||
pillar.fetch_remotes()
|
||||
pillar.checkout()
|
||||
ret = {}
|
||||
merge_strategy = __opts__.get(
|
||||
|
@ -70,10 +70,12 @@ def minion_process():
|
||||
time.sleep(5)
|
||||
try:
|
||||
# check pid alive (Unix only trick!)
|
||||
os.kill(parent_pid, 0)
|
||||
except OSError:
|
||||
if os.getuid() == 0 and not salt.utils.is_windows():
|
||||
os.kill(parent_pid, 0)
|
||||
except OSError as exc:
|
||||
# forcibly exit, regular sys.exit raises an exception-- which
|
||||
# isn't sufficient in a thread
|
||||
log.error('Minion process encountered exception: {0}'.format(exc))
|
||||
os._exit(salt.defaults.exitcodes.EX_GENERIC)
|
||||
|
||||
if not salt.utils.is_windows():
|
||||
|
@ -1,19 +1,6 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
OPTS="-oStrictHostKeyChecking=no -oPasswordAuthentication=no -oKbdInteractiveAuthentication=no -oChallengeResponseAuthentication=no"
|
||||
if test -n "$GIT_IDENTITY"; then
|
||||
OPTS="$OPTS -i $GIT_IDENTITY"
|
||||
# Check /etc/ssh and /usr/local/etc/ssh for the global ssh_config
|
||||
if test -e "/etc/ssh/ssh_config"; then
|
||||
OVERRIDE_SSH_CONFIG="/etc/ssh/ssh_config"
|
||||
elif test -e "/usr/local/etc/ssh/ssh_config"; then
|
||||
OVERRIDE_SSH_CONFIG="/usr/local/etc/ssh/ssh_config"
|
||||
else
|
||||
OVERRIDE_SSH_CONFIG=""
|
||||
fi
|
||||
# If a global ssh_config was found, add it to the opts. This keeps the
|
||||
# user's ~/.ssh/config from overriding the "-i" param.
|
||||
if test -n "$OVERRIDE_SSH_CONFIG"; then
|
||||
OPTS="$OPTS -F $OVERRIDE_SSH_CONFIG"
|
||||
fi
|
||||
fi
|
||||
exec ssh $OPTS "$@"
|
||||
|
@ -37,6 +37,15 @@ import salt.ext.six as six
|
||||
@skipIf(salt.utils.which_bin(KNOWN_BINARY_NAMES) is None, 'virtualenv not installed')
|
||||
class PipStateTest(integration.ModuleCase, integration.SaltReturnAssertsMixIn):
|
||||
|
||||
def test_pip_installed_removed(self):
|
||||
'''
|
||||
Tests installed and removed states
|
||||
'''
|
||||
ret = self.run_state('pip.installed', name='docker-py')
|
||||
self.assertSaltTrueReturn(ret)
|
||||
ret = self.run_state('pip.removed', name='docker-py')
|
||||
self.assertSaltTrueReturn(ret)
|
||||
|
||||
def test_pip_installed_errors(self):
|
||||
venv_dir = os.path.join(
|
||||
integration.SYS_TMP_DIR, 'pip-installed-errors'
|
||||
|
Loading…
Reference in New Issue
Block a user