Merge branch '2015.5' into '2015.8'

Conflicts:
  - .testing.pylintrc
  - salt/cloud/clouds/joyent.py
This commit is contained in:
rallytime 2016-03-15 12:34:57 -06:00
commit 1a1ce05186
17 changed files with 182 additions and 27 deletions

View file

@ -80,11 +80,21 @@ disable=R,
I0011,
I0012,
I0013,
E0302,
E0401,
E1101,
E1103,
E1136,
E8114,
C0102,
C0103,
C0111,
C0112,
C0122,
C0123,
C0411,
C0412,
C0413,
C0203,
C0204,
C0301,
@ -130,11 +140,19 @@ disable=R,
# I0011 (locally-disabling)
# I0012 (locally-enabling)
# I0013 (file-ignored)
# E0302 (unexpected-special-method-signature)
# E0401 (import-error)
# E1101 (no-member) [pylint isn't smart enough]
# E1103 (maybe-no-member)
# E1136 (unsubscriptable-object)
# E8114 (indentation-is-not-a-multiple-of-four-comment)
# C0102 (blacklisted-name) [because it activates C0103 too]
# C0103 (invalid-name)
# C0111 (missing-docstring)
# C0113 (unneeded-not)
# C0122 (misplaced-comparison-constant)
# C0123 (unidiomatic-typecheck)
# C0412 (ungrouped-imports)
# C0203 (bad-mcs-method-argument)
# C0204 (bad-mcs-classmethod-argument)
# C0301 (line-too-long)
@ -180,6 +198,7 @@ output-format=text
files-output=no
# Tells whether to display a full report or only the messages
# This will be removed in pylint 1.6
reports=no
# Python expression which should return a note less than 10 (10 is the highest

View file

@ -71,15 +71,15 @@ defaults:
{{ salt['grains.get']('os') }}
env
====
saltenv
=======
The `env` variable is available in only in sls files when gathering the sls
The `saltenv` variable is available in only in sls files when gathering the sls
from an environment.
.. code-block:: jinja
{{ env }}
{{ saltenv }}
sls
====
@ -91,4 +91,4 @@ include option.
.. code-block:: jinja
{{ sls }}
{{ sls }}

View file

@ -0,0 +1,90 @@
===========================
Salt 2014.7.8 Release Notes
===========================
Changes for v2014.7.7..v2014.7.8
--------------------------------
Extended changelog courtesy of Todd Stansell (https://github.com/tjstansell/salt-changelogs):
*Generated at: 2016-03-11T21:18:48Z*
Statistics:
- Total Merges: **7**
- Total Issue references: **3**
- Total PR references: **10**
Changes:
- **PR** `#28839`_: (*cachedout*) Revert `#28740`_
@ *2015-11-12T22:54:28Z*
- **PR** `#28740`_: (*MasterNayru*) Add missing S3 module import
| refs: `#28777`_
* 4b8bdd0 Merge pull request `#28839`_ from cachedout/revert_28740
* 215b26c Revert `#28740`_
- **PR** `#28777`_: (*rallytime*) Back-port `#28740`_ to 2014.7
@ *2015-11-11T18:00:00Z*
- **PR** `#28740`_: (*MasterNayru*) Add missing S3 module import
| refs: `#28777`_
* 76e69b4 Merge pull request `#28777`_ from rallytime/`bp-28740`_-2014.7
* da5fac2 Back-port `#28740`_ to 2014.7
- **PR** `#28716`_: (*rallytime*) Back-port `#28705`_ to 2014.7
@ *2015-11-10T16:15:03Z*
- **PR** `#28705`_: (*cachedout*) Account for new headers class in tornado 4.3
| refs: `#28716`_
* 45c73eb Merge pull request `#28716`_ from rallytime/`bp-28705`_
* 32e7bd3 Account for new headers class in tornado 4.3
- **PR** `#28717`_: (*cachedout*) Add note about recommended umask
@ *2015-11-09T23:26:20Z*
- **ISSUE** `#28199`_: (*felskrone*) Non-standard umasks might break the master
| refs: `#28717`_
* f4fe921 Merge pull request `#28717`_ from cachedout/umask_note
* 1874300 Add note about recommended umask
- **PR** `#28461`_: (*cachedout*) Wrap all cache calls in state.sls in correct umask
@ *2015-11-02T17:11:02Z*
- **ISSUE** `#28455`_: (*zmalone*) highstate.cache is world readable, and contains secrets
| refs: `#28461`_
* 4bf56ca Merge pull request `#28461`_ from cachedout/issue_28455
* 097838e Wrap all cache calls in state.sls in correct umask
- **PR** `#28407`_: (*DmitryKuzmenko*) Don't request creds if auth with key.
@ *2015-10-29T16:12:30Z*
- **ISSUE** `#24910`_: (*bocig*) -T, --make-token flag does NOT work- LDAP Groups
| refs: `#28407`_
* f3e61db Merge pull request `#28407`_ from DSRCompany/issues/24910_token_auth_fix_2014
* b7b5bec Don't request creds if auth with key.
- **PR** `#27390`_: (*JaseFace*) Ensure we pass on the enable setting if present, or use the default of True if not in build_schedule_item()
@ *2015-10-05T18:09:33Z*
* d284eb1 Merge pull request `#27390`_ from JaseFace/schedule-missing-enabled
* 563db71 Ensure we pass on the enable setting if present, or use the default of True if not in build_schedule_item() Prior to this, when schedule.present compares the existing schedule to the one crafted by this function, enabled will actually be removed at each run. schedule.present sees a modification needs to be made, and invokes schedule.modify, which does so with enabled: True, creating and endless loop of an 'enabled' removal and addition.
.. _`#24910`: https://github.com/saltstack/salt/issues/24910
.. _`#27390`: https://github.com/saltstack/salt/pull/27390
.. _`#28199`: https://github.com/saltstack/salt/issues/28199
.. _`#28407`: https://github.com/saltstack/salt/pull/28407
.. _`#28455`: https://github.com/saltstack/salt/issues/28455
.. _`#28461`: https://github.com/saltstack/salt/pull/28461
.. _`#28705`: https://github.com/saltstack/salt/pull/28705
.. _`#28716`: https://github.com/saltstack/salt/pull/28716
.. _`#28717`: https://github.com/saltstack/salt/pull/28717
.. _`#28740`: https://github.com/saltstack/salt/pull/28740
.. _`#28777`: https://github.com/saltstack/salt/pull/28777
.. _`#28839`: https://github.com/saltstack/salt/pull/28839
.. _`bp-28705`: https://github.com/saltstack/salt/pull/28705
.. _`bp-28740`: https://github.com/saltstack/salt/pull/28740

View file

@ -0,0 +1,45 @@
===========================
Salt 2014.7.9 Release Notes
===========================
Changes for v2014.7.8..v2014.7.9
--------------------------------
Extended changelog courtesy of Todd Stansell (https://github.com/tjstansell/salt-changelogs):
*Generated at: 2016-03-11T20:58:58Z*
Statistics:
- Total Merges: **3**
- Total Issue references: **1**
- Total PR references: **3**
Changes:
- **PR** `#31826`_: (*gtmanfred*) Remove ability of authenticating user to specify pam service
@ *2016-03-11T20:41:01Z*
* c5e7c03 Merge pull request `#31826`_ from gtmanfred/2014.7
* d73f70e Remove ability of authenticating user to specify pam service
- **PR** `#29392`_: (*jacobhammons*) updated version number to not reference a specific build from the lat…
@ *2015-12-03T15:54:31Z*
* 85aa70a Merge pull request `#29392`_ from jacobhammons/2014.7
* d7f0db1 updated version number to not reference a specific build from the latest branch
- **PR** `#29296`_: (*douardda*) Use process KillMode on Debian systems also
@ *2015-12-01T16:00:16Z*
- **ISSUE** `#29295`_: (*douardda*) systemd's service file should use the 'process' KillMode option on Debian also
| refs: `#29296`_
* d2fb210 Merge pull request `#29296`_ from douardda/patch-3
* d288539 Use process KillMode on Debian systems also
.. _`#29295`: https://github.com/saltstack/salt/issues/29295
.. _`#29296`: https://github.com/saltstack/salt/pull/29296
.. _`#29392`: https://github.com/saltstack/salt/pull/29392
.. _`#31826`: https://github.com/saltstack/salt/pull/31826

View file

@ -87,9 +87,9 @@ def beacon(config):
__context__[LOC_KEY] = fp_.tell()
pack = struct.unpack(FMT, raw)
event = {}
for ind in range(len(FIELDS)):
event[FIELDS[ind]] = pack[ind]
if isinstance(event[FIELDS[ind]], str):
event[FIELDS[ind]] = event[FIELDS[ind]].strip('\x00')
for ind, field in enumerate(FIELDS):
event[field] = pack[ind]
if isinstance(event[field], str):
event[field] = event[field].strip('\x00')
ret.append(event)
return ret

View file

@ -95,12 +95,12 @@ def beacon(config):
'tag': pid}
if 'execve' in line:
comps = line.split('execve')[1].split('"')
for ind in range(len(comps)):
for ind, field in enumerate(comps):
if ind == 1:
event['cmd'] = comps[ind]
event['cmd'] = field
continue
if ind % 2 != 0:
event['args'].append(comps[ind])
event['args'].append(field)
event['user'] = __context__[pkey][pid]['user']
ret.append(event)
if not __context__[pkey][pid]['vt'].isalive():

View file

@ -91,9 +91,9 @@ def beacon(config):
__context__[LOC_KEY] = fp_.tell()
pack = struct.unpack(FMT, raw)
event = {}
for ind in range(len(FIELDS)):
event[FIELDS[ind]] = pack[ind]
if isinstance(event[FIELDS[ind]], str):
event[FIELDS[ind]] = event[FIELDS[ind]].strip('\x00')
for ind, field in enumerate(FIELDS):
event[field] = pack[ind]
if isinstance(event[field], str):
event[field] = event[field].strip('\x00')
ret.append(event)
return ret

View file

@ -781,7 +781,7 @@ class Single(object):
fsclient=self.fsclient,
minion_opts=self.minion_opts,
**self.target)
opts_pkg = pre_wrapper['test.opts_pkg']()
opts_pkg = pre_wrapper['test.opts_pkg']() # pylint: disable=E1102
opts_pkg['file_roots'] = self.opts['file_roots']
opts_pkg['pillar_roots'] = self.opts['pillar_roots']
opts_pkg['ext_pillar'] = self.opts['ext_pillar']

View file

@ -140,7 +140,7 @@ def main(argv): # pylint: disable=W0613
# Salt thin now is available to use
else:
scpstat = subprocess.Popen(['/bin/sh', '-c', 'command -v scp']).wait()
if not scpstat == 0:
if scpstat != 0:
sys.exit(EX_SCP_NOT_FOUND)
if not os.path.exists(OPTIONS.saltdir):

View file

@ -196,7 +196,7 @@ def query_instance(vm_=None, call=None):
if isinstance(data, dict) and 'error' in data:
log.warn(
'There was an error in the query {0}'.format(data['error']) # pylint: disable=E1126
'There was an error in the query. {0}'.format(data.get('error'))
)
# Trigger a failure in the wait for IP function
return False

View file

@ -857,7 +857,7 @@ def _format_instance_info_select(vm, selection):
if 'files' in selection:
file_full_info = {}
if "layoutEx.file" in file:
if "layoutEx.file" in file: # pylint: disable=E1135
for file in vm["layoutEx.file"]:
file_full_info[file.key] = {
'key': file.key,

View file

@ -298,7 +298,7 @@ def __process_tokens_internal(tokens, start_at=0):
log.debug(" TYPE: ASSIGNMENT")
is_assignment = True
else:
raise CommandExecutionError('Unknown token!', 'Token:'+token)
raise CommandExecutionError('Unknown token! Token: {0}'.format(token))
token_no = token_no + 1

View file

@ -3021,7 +3021,7 @@ def update_lxc_conf(name, lxc_conf, lxc_conf_unset, path=None):
({line[0]: line[1:]}, {key: item}))
break
if not matched:
if not (key, item) in lines:
if (key, item) not in lines:
lines.append((key, item))
changes['added'].append({key: item})
dest_lxc_conf = []

View file

@ -30,7 +30,7 @@ except ImportError:
def __virtual__():
if not HAS_PSUTIL:
return False
return False, 'The ps module cannot be loaded: python module psutil not installed.'
# Functions and attributes used in this execution module seem to have been
# added as of psutil 0.3.0, from an inspection of the source code. Only
@ -41,7 +41,7 @@ def __virtual__():
# as of Dec. 2013 EPEL is on 0.6.1, Debian 7 is on 0.5.1, etc.).
if psutil.version_info >= (0, 3, 0):
return True
return False
return False, 'The ps module cannot be loaded: psutil must be version 0.3.0 or greater.'
def _get_proc_cmdline(proc):

View file

@ -37,6 +37,7 @@ from distutils.version import StrictVersion # pylint: disable=no-name-in-module
try:
import boto.ec2
import boto.utils
import boto.exception
HAS_BOTO = True
except ImportError:
HAS_BOTO = False
@ -123,7 +124,7 @@ def ext_pillar(minion_id,
try:
conn = boto.ec2.connect_to_region(region)
except boto.exception as e:
except boto.exception as e: # pylint: disable=E0712
log.error("%s: invalid AWS credentials.", __name__)
return None

View file

@ -184,7 +184,7 @@ def datasource_exists(name, jboss_config, datasource_properties, recreate=False)
ret['result'] = False
ret['comment'] = 'Could not create datasource. Stdout: '+create_result['stdout']
else:
raise CommandExecutionError('Unable to handle error', ds_result['failure-description'])
raise CommandExecutionError('Unable to handle error: {0}'.format(ds_result['failure-description']))
if ret['result']:
log.debug("ds_new_properties=%s", str(ds_new_properties))

View file

@ -1850,7 +1850,7 @@ def rm_rf(path):
os.chmod(path, stat.S_IWUSR)
func(path)
else:
raise
raise # pylint: disable=E0704
shutil.rmtree(path, onerror=_onerror)