Merge branch '2017.7' into jenkins_pylint

This commit is contained in:
Damon Atkins 2018-10-23 00:35:54 +11:00 committed by GitHub
commit aebce88d82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 30 additions and 10 deletions

View file

@ -1,4 +1,4 @@
timeout(time: 6, unit: 'HOURS') {
timeout(time: 8, unit: 'HOURS') {
node('kitchen-slave') {
timestamps {
ansiColor('xterm') {

View file

@ -13,7 +13,7 @@ end
group :windows do
gem 'winrm', '~>2.0'
gem 'winrm-fs', :git => 'https://github.com/dwoz/winrm-fs.git', :branch => 'chunked_downloads'
gem 'winrm-fs', '~>1.3.1'
end
group :ec2 do

View file

@ -114,6 +114,12 @@ Set up the provider cloud config at ``/etc/salt/cloud.providers`` or
driver: gce
.. note::
Empty strings as values for ``service_account_private_key`` and ``service_account_email_address``
can be used on GCE instances. This will result in the service account assigned to the GCE instance
being used.
.. note::
The value provided for ``project`` must not contain underscores or spaces and

View file

@ -4,3 +4,13 @@ In Progress: Salt 2017.7.9 Release Notes
Version 2017.7.9 is an **unreleased** bugfix release for :ref:`2017.7.0 <release-2017-7-0>`.
This release is still in progress and has not been released yet.
Salt Cloud Features
===================
GCE Driver
----------
The GCE salt cloud driver can now be used with GCE instance credentials by
setting the configuration paramaters ``service_account_private_key`` and
``service_account_private_email`` to an empty string.

View file

@ -129,7 +129,8 @@ def __virtual__():
parameters = details['gce']
pathname = os.path.expanduser(parameters['service_account_private_key'])
if salt.utils.cloud.check_key_path_and_mode(
# empty pathname will tell libcloud to use instance credentials
if pathname and salt.utils.cloud.check_key_path_and_mode(
provider, pathname
) is False:
return False

View file

@ -446,6 +446,8 @@ def _windows_virtual(osdata):
if osdata['kernel'] != 'Windows':
return grains
grains['virtual'] = 'physical'
# It is possible that the 'manufacturer' and/or 'productname' grains
# exist but have a value of None.
manufacturer = osdata.get('manufacturer', '')

View file

@ -1430,7 +1430,7 @@ class Minion(MinionBase):
sdata = {'pid': os.getpid()}
sdata.update(data)
log.info('Starting a new job with PID {0}'.format(sdata['pid']))
log.info('Starting a new job %s with PID %s', data['jid'], sdata['pid'])
with salt.utils.fopen(fn_, 'w+b') as fp_:
fp_.write(minion_instance.serial.dumps(sdata))
ret = {'success': False}

View file

@ -1026,11 +1026,8 @@ def _parse_conf(conf_file=None, in_mem=False, family='ipv4'):
if args[-1].startswith('-'):
args.append('')
parsed_args = []
if sys.version.startswith('2.6'):
(opts, leftover_args) = parser.parse_args(args)
parsed_args = vars(opts)
else:
parsed_args = vars(parser.parse_args(args))
opts, _ = parser.parse_known_args(args)
parsed_args = vars(opts)
ret_args = {}
chain = parsed_args['append']
for arg in parsed_args:

View file

@ -160,7 +160,11 @@ class GroupModuleTest(ModuleCase):
self.run_function('user.add', [self._user])
self.run_function('user.add', [self._user1])
m = '{0},{1}'.format(self._user, self._user1)
self.assertTrue(self.run_function('group.members', [self._group, m]))
ret = self.run_function('group.members', [self._group, m])
if salt.utils.is_windows():
self.assertTrue(ret['result'])
else:
self.assertTrue(ret)
group_info = self.run_function('group.info', [self._group])
self.assertIn(self._user, str(group_info['members']))
self.assertIn(self._user1, str(group_info['members']))