mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #34073 from rallytime/merge-2016.3
[2016.3] Merge forward from 2015.8 to 2016.3
This commit is contained in:
commit
f2a2c2bf53
13
doc/topics/releases/2015.8.11.rst
Normal file
13
doc/topics/releases/2015.8.11.rst
Normal file
@ -0,0 +1,13 @@
|
||||
============================
|
||||
Salt 2015.8.11 Release Notes
|
||||
============================
|
||||
|
||||
Version 2015.8.11 is a bugfix release for :doc:`2015.8.0
|
||||
</topics/releases/2015.8.0>`.
|
||||
|
||||
Returner Changes
|
||||
================
|
||||
|
||||
- Any returner which implements a ``save_load`` function is now required to
|
||||
accept a ``minions`` keyword argument. All returners which ship with Salt
|
||||
have been modified to do so.
|
@ -723,7 +723,12 @@ class FSChan(object):
|
||||
self.kwargs = kwargs
|
||||
self.fs = Fileserver(self.opts)
|
||||
self.fs.init()
|
||||
self.fs.update()
|
||||
if self.opts.get('file_client', 'remote') == 'local':
|
||||
if '__fs_update' not in self.opts:
|
||||
self.fs.update()
|
||||
self.opts['__fs_update'] = True
|
||||
else:
|
||||
self.fs.update()
|
||||
self.cmd_stub = {'ext_nodes': {}}
|
||||
|
||||
def send(self, load, tries=None, timeout=None):
|
||||
|
@ -84,7 +84,7 @@ def _query(function,
|
||||
)
|
||||
|
||||
if result.get('status', None) == salt.ext.six.moves.http_client.OK:
|
||||
ret['data'] = result['dict']
|
||||
ret['data'] = result.get('dict', result)
|
||||
ret['res'] = True
|
||||
elif result.get('status', None) == salt.ext.six.moves.http_client.NO_CONTENT:
|
||||
ret['res'] = False
|
||||
|
@ -9,12 +9,12 @@ Enable and disable apache modules.
|
||||
.. code-block:: yaml
|
||||
|
||||
Enable cgi module:
|
||||
apache_module.enabled:
|
||||
- name: cgi
|
||||
apache_module.enabled:
|
||||
- name: cgi
|
||||
|
||||
Disable cgi module:
|
||||
apache_module.disabled:
|
||||
- name: cgi
|
||||
apache_module.disabled:
|
||||
- name: cgi
|
||||
'''
|
||||
from __future__ import absolute_import
|
||||
from salt.ext.six import string_types
|
||||
|
@ -1866,9 +1866,9 @@ def directory(name,
|
||||
- dir_mode: 755
|
||||
- file_mode: 644
|
||||
- recurse:
|
||||
- user
|
||||
- group
|
||||
- mode
|
||||
- user
|
||||
- group
|
||||
- mode
|
||||
|
||||
Leave files or directories unchanged:
|
||||
|
||||
@ -1881,10 +1881,10 @@ def directory(name,
|
||||
- dir_mode: 755
|
||||
- file_mode: 644
|
||||
- recurse:
|
||||
- user
|
||||
- group
|
||||
- mode
|
||||
- ignore_dirs
|
||||
- user
|
||||
- group
|
||||
- mode
|
||||
- ignore_dirs
|
||||
|
||||
.. versionadded:: 2015.5.0
|
||||
|
||||
@ -3528,9 +3528,9 @@ def append(name,
|
||||
- append
|
||||
- template: jinja
|
||||
- sources:
|
||||
- salt://motd/devops-messages.tmpl
|
||||
- salt://motd/hr-messages.tmpl
|
||||
- salt://motd/general-messages.tmpl
|
||||
- salt://motd/devops-messages.tmpl
|
||||
- salt://motd/hr-messages.tmpl
|
||||
- salt://motd/general-messages.tmpl
|
||||
|
||||
.. versionadded:: 0.9.5
|
||||
'''
|
||||
@ -3706,9 +3706,9 @@ def prepend(name,
|
||||
- prepend
|
||||
- template: jinja
|
||||
- sources:
|
||||
- salt://motd/devops-messages.tmpl
|
||||
- salt://motd/hr-messages.tmpl
|
||||
- salt://motd/general-messages.tmpl
|
||||
- salt://motd/devops-messages.tmpl
|
||||
- salt://motd/hr-messages.tmpl
|
||||
- salt://motd/general-messages.tmpl
|
||||
|
||||
.. versionadded:: 2014.7.0
|
||||
'''
|
||||
|
@ -42,7 +42,7 @@ class StdTest(integration.ModuleCase):
|
||||
assert num_ret > 0
|
||||
|
||||
# ping a minion that doesn't exist, to make sure that it doesn't hang forever
|
||||
# create fake mininion
|
||||
# create fake minion
|
||||
key_file = os.path.join(self.master_opts['pki_dir'], 'minions', 'footest')
|
||||
# touch the file
|
||||
salt.utils.fopen(key_file, 'a').close()
|
||||
@ -116,6 +116,37 @@ class StdTest(integration.ModuleCase):
|
||||
ret['minion']
|
||||
)
|
||||
|
||||
def test_disconnected_return(self):
|
||||
'''
|
||||
Test return/messaging on a disconnected minion
|
||||
'''
|
||||
test_ret = {'ret': 'Minion did not return. [Not connected]', 'out': 'no_return'}
|
||||
|
||||
# Create a minion key, but do not start the "fake" minion. This mimics
|
||||
# a disconnected minion.
|
||||
key_file = os.path.join(self.master_opts['pki_dir'], 'minions', 'disconnected')
|
||||
salt.utils.fopen(key_file, 'a').close()
|
||||
|
||||
# ping disconnected minion and ensure it times out and returns with correct message
|
||||
try:
|
||||
cmd_iter = self.client.cmd_cli(
|
||||
'disconnected',
|
||||
'test.ping',
|
||||
show_timeout=True
|
||||
)
|
||||
num_ret = 0
|
||||
for ret in cmd_iter:
|
||||
num_ret += 1
|
||||
self.assertEqual(ret['disconnected']['ret'], test_ret['ret'])
|
||||
self.assertEqual(ret['disconnected']['out'], test_ret['out'])
|
||||
|
||||
# Ensure that we entered the loop above
|
||||
self.assertEqual(num_ret, 1)
|
||||
|
||||
finally:
|
||||
os.unlink(key_file)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
from integration import run_tests
|
||||
run_tests(StdTest)
|
||||
|
Loading…
Reference in New Issue
Block a user