Commit Graph

68755 Commits

Author SHA1 Message Date
rallytime
efe3ec82da Merge branch '2016.3' into 'develop'
Conflicts:
  - doc/ref/configuration/master.rst
  - salt/modules/glusterfs.py
  - salt/modules/service.py
  - tests/unit/modules/glusterfs_test.py
2016-04-13 16:10:33 -06:00
Theodore Cowan
b6d640da0d Allow sqs messages to be deserialized from json (#32557)
This engine is most useful if users could deserialize json messages, making the data within usable in reactors.  For example, messages from the CloudWatch Event system.
2016-04-13 15:09:35 -06:00
Nicole Thomas
778fbe00fa Add html_url to "min" dictionary that is returned for issues (#32549) 2016-04-13 15:09:11 -06:00
Daniel Wallace
6c3d7aa293 use defaults if opts doesn't have the keys either (#32550)
Fixes #32456
2016-04-13 15:08:58 -06:00
Nicole Thomas
7647f2f4f2 Merge pull request #32543 from rallytime/merge-2016.3
[2016.3] Merge forward from 2015.8 to 2016.3
2016-04-13 14:06:32 -06:00
Thomas S Hatch
c8facc5dae these are no longer loaded by the loader and proved to be (#32548)
more trouble that they were worth.
2016-04-13 12:55:54 -06:00
skizunov
b2ce8b5b72 PY3: salt-key --gen-keys fix (#32546)
`__init__.py`:
- On certain invocations of salt-key (seen when invoked programmatically
on Windows without going through the command interpreter `cmd.exe`),
`sys.stdin` is None. This has only been seen on Python 3. So
`encoding = sys.stdin.encoding` raises an exception in this case.

`utils/__init__.py`:
- `pem_finger` reads a file in binary mode. So in Python 3, the return
type is bytes and not str. Simple fix by using `b''.join` instead of
`''.join`.

Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
2016-04-13 12:55:04 -06:00
rallytime
b77993d9a1 Merge branch '2015.8' into '2016.3'
Conflicts:
  - doc/ref/configuration/minion.rst
  - doc/topics/targeting/grains.rst
  - salt/crypt.py
  - salt/scripts.py
  - salt/states/dockerng.py
  - salt/states/pkg.py
2016-04-13 09:42:54 -06:00
Nicole Thomas
cce7de76b0 Merge pull request #32539 from rallytime/merge-2015.8
[2015.8] Merge forward from 2015.5 to 2015.8
2016-04-13 09:10:08 -06:00
rallytime
fbaeb165c9 Merge branch '2015.5' into merge-2015.8
No conflicts.
2016-04-13 09:07:39 -06:00
Nicole Thomas
7307bcb88e Merge pull request #32538 from rallytime/bp-32528
Back-port #32528 to 2015.5
2016-04-13 09:06:14 -06:00
rallytime
46a4e8a310 Remove merge conflict line 2016-04-13 09:05:31 -06:00
Andrew Pashkin
e0d947c707 Document "grains" setting in the minion configuration reference 2016-04-13 08:56:05 -06:00
Nicole Thomas
1834bdefe3 Merge pull request #32531 from ticosax/support-no-volumes
[dockerng] Fix support of dockerng.volume_present when no volume is on present.
2016-04-13 08:42:12 -06:00
Nicolas Delaby
5d73d54ed2 Enhance dockerng.wait() to control success on exit_code and on already stopped containers (#32475) 2016-04-13 08:16:26 -06:00
Bo Maryniuk
214f01e963 Bugfix: salt-key crashes if tries to generate keys to the directory w/o write access (#32436)
* Raise an exception if keys are tried to be written to the directory that has no write access permissions

* Show an reasonable error message instead of a traceback crash.

* Fix the unit tests
2016-04-13 08:15:37 -06:00
C. R. Oldham
17fdd7a8d4 Engines with proxies (#32508)
* Allow engines to run with proxies.

* Propagate proxy all the way down to proc_mgr.add_process

* Lint
2016-04-13 08:15:18 -06:00
Eric Radman
fec256ea6a Avoid KeyError if cron change does not include a diff (#32513)
Prevents this exception:

    File "/tmp/saltenv/lib/python2.7/site-packages/salt/state.py", line 1703, in call
      **cdata['kwargs'])
    File "/tmp/saltenv/lib/python2.7/site-packages/salt/loader.py", line 1661, in wrapper
      return f(*args, **kwargs)
    File "/tmp/saltenv/lib/python2.7/site-packages/salt/states/cron.py", line 567, in file
      ret['changes'] = {'diff': ret['changes']['diff']}
    KeyError: 'diff'

As far as I can tell this line is a noop at best
2016-04-13 08:14:38 -06:00
Erik Johnson
288839f4b6 Turn on exc_info when logging failed minion startup (#32515) 2016-04-13 08:13:53 -06:00
Eric Radman
9d68db760d Allow user login class to be empty on OpenBSD (#32518)
* Fix tests that assert CommandExecutionError (#32485)

Trying to assert that an exception was raised using
helper_open.write.assertRaises() is bogus--there is no such method. Use
standard unittest.assertRaises() instead.

* Allow user class to be blank

Attempts to address Issue#32512
2016-04-13 08:12:45 -06:00
Erik Johnson
08a80207e6 Add ignore_epoch option to pkg.installed/removed/purged states (#32520)
This allows for the epoch to be disregarded when a version is specified.
2016-04-13 08:11:33 -06:00
Nicole Thomas
4f10427f0f Add get_issue_comments function to the github module (#32522) 2016-04-13 08:07:05 -06:00
Andrew Pashkin
e9da85ba91 Fix YAML-block in "Organizing Pillar data" part of "Salt Formulas" docs page (#32527) 2016-04-13 08:06:19 -06:00
Alejandro Bednarik
d7f885adf2 Updated rsync module _virtual__. (#32524)
Small update to presnet a proper message when rsync command is not found and
module cannot be loaded.
2016-04-13 08:05:30 -06:00
Alejandro del Castillo
9ec7c7c620 Fix salt-call on standalone minion case (#32521)
* skip connection error if master_type == disable

Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>

* fix salt-call when master_type == disable

salt-call errors out on salt.pillar.get_pillar if master_type ==
disable. Skip get_pillar call on standalone minion case. Also skip code
that returns job info back to the master.

Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
2016-04-13 08:04:54 -06:00
Andrew Pashkin
bb4d47dc93 Document "grains" setting in the minion configuration reference (#32528) 2016-04-13 08:01:57 -06:00
Justin Findlay
da631a3ab7 salt.version: case insensitive ordering of deps (#32532) 2016-04-13 08:01:36 -06:00
Moe
4a806dd21f Add site bindings to win_iis (#32530) 2016-04-13 07:59:26 -06:00
Nicolas Delaby
958b2ec749 Fix support of dockerng.volume_present when no volume is on present.
fixes #32493
2016-04-13 15:47:13 +02:00
Nicole Thomas
13d2129aa3 Merge pull request #32516 from thatch45/thorium_doc
Fix rendering error with thorium docs
2016-04-12 14:33:25 -06:00
Thomas S Hatch
829f1b0d58 Fix rendering error with thorium docs 2016-04-12 13:58:12 -06:00
Daniel Wallace
3561664891 sync engines to minions (#32507) 2016-04-12 13:17:44 -06:00
Eric Radman
bae492ad8f Fix tests that assert CommandExecutionError (#32485)
Trying to assert that an exception was raised using
helper_open.write.assertRaises() is bogus--there is no such method. Use
standard unittest.assertRaises() instead.
2016-04-12 08:41:25 -06:00
Tom Williams
6208a29825 Various boto2 module enhancements (#32496)
* ip_protocol.isdigit() fails when isinstance(ip_protocol, int)

* Fix """Warnings: 'name' is an invalid keyword argument for
'boto_iam.account_policy'. If you were trying to pass additional
data to be used in a template context, please populate 'context'
with 'key: value' pairs. Your approach will work until Salt Carbon
is out. Please update your state files."""

* Add boto_iam.get_all_users() module function

* Add boto_iam.get_all_groups() module function

* Update boto_iam.export_users() to use new get_all_users() function

* Add boto_iam.get_all_roles() module function

* Finally got around to implementing image_name option to boto_ec2.instance_present :)

* Add boto_secgroup.get_all_security_groups() function
Add options public_ip, allocation_id, and allocate_eip to boto_ec2.instance_exists()
Add option release_eip to boto_ec2.instance_absent()

* Boy, I REALLY disagree with PEP about the whole "whitespace after/before braces/brackets/parens" readability thing....
2016-04-12 08:38:46 -06:00
Andre-Schuiki
c3f51d02f0 Fixing Unicode Error / Accept Eula Windows Update Modules/States (#32502)
* Fixed issue #30980 (UnicodeEncodeError -> non ascii characters in update title)
added accept eula logic

* Fixed issue #30980 (UnicodeEncodeError -> non ascii characters in update title)
Fixed AcceptEula, didn't work correctly because of missing parentheses
2016-04-12 08:36:54 -06:00
Eliot Walker
4c7cbbc3c0 Add ability to configure DynamoDB backups using pillars (#32503) 2016-04-12 08:15:34 -06:00
Ryan Walder
5d760c1f46 Add Cumulus support to aptpkg (#32504)
Cumulus is a Debian based switch OS, needs support for pkg installs.
2016-04-12 08:15:14 -06:00
Archie
fd6dd86fae Small typo fix (#32498) 2016-04-12 08:14:44 -06:00
Bo Maryniuk
492ebfc184 Isbm zypper list products sles11 crash (#32505)
* Check for EOL aggregate and fix time_t attribute

* Update SLE11 SP3 data

* Update SLE12 SP1 data

* Adjust test values according to the testing data
2016-04-12 08:14:19 -06:00
Carson A
f9ed9a19c9 Closes #31078 - Add options for syslog returner (#32464) 2016-04-11 17:09:22 -06:00
Nicole Thomas
216d9fdc9a [develop] Merge forward from 2016.3 to develop (#32494)
* fix sorting by latest version when called with an attribute

* remove reference to master_alive_check

* Fixes saltstack/salt#28262

* Resolve memory leak in authentication

* outputter virt_list does not exist anymore

* Update proxmox documentation

* Fix documentation on boto_asg and boto_elb modules and states

* modules.win_timezone: don't list all zones in debug log

* Correcty index glusterfs bricks

Fixes issue #32311

* Cleaner deprecation process with decorators

* Add deprecation decorator scaffold

* Capture type error and unhandled exceptions while function calls

* Aware of the current and future version of deprecation

* Implement initially is_deprecated decorator

* Add an alias for the capitalization

* Fix capitalization easier way

* Remove an extra line

* Add successor name to the deprecation decorator.

* Granulate logging and error messages.

* Implement function swapper

* Raise later the caught exception

* Clarify exception message

* Save function original name

* Remove an extra line

* Hide an alternative hidden function name in the error message, preserving the error itself

* Rename variable as private

* Add a method to detect if a function is using its previous version

* Message to the log and/or raise an exception accordingly to the status of used function

* Log an error along with the exception

* Add internal method documentation

* Add documentation and usage process for decorator "is_deprecated"

* Add documentation and process usage for the decorator "with_deprecated"

* Hide private method name

* Fix PEP8, re-word the error message

* Deprecate basic uptime function

* Add initial decorator unit test

* Rename old/new functions, mock versions

* Move frequent data to the test setup

* Add logging on EOL exception

* Rename and document high to low version test on is_deprecated

* Implement a test on low to high version of is_deprecated decorator

* Add a correction to the test description

* Remove a dead code

* Implement a test for high to low version on is_deprecated, using with_successor param

* Correct typso adn mistaeks

* Implement high to low version with successor param on is_deprecated

* Setup a virtual name for the module

* Implement test for with_deprecated should raise an exception if same deprecated function not found

* Implement test for with_deprecated an old function is picked up if configured

* Correct test description purpose

* Implement test with_deprecated when no deprecation is requested

* Add logging test to the configured deprecation request

* Add logging testing when deprecated version wasn't requested

* Implement test EOL for with_deprecated decorator

* Correct test explanation

* Rename the test

* Implement with_deprecated no EOL, deprecated other function name

* Implement with_deprecated, deprecated other function name, EOL reached

* Add test description for the with_deprecated + with_name + EOL

* Fix confusing test names

* Add logging test to the is_deprecated decorator when function as not found.

* Add more test point to each test, remove empty lines

* Bugfix: at certain conditions a wrong alias name is reported to the log

* Fix a typo in a comment

* Add test for the logging

* Disable a pylint: None will _never_ be raised

* Fix test for the deprecated "status.uptime" version

* Bugfix: Do not yank raised exceptions

* Remove unnecessary decorator

* Add test for the new uptime

* Add test for the new uptime fails when /proc/uptime does not exists

* Rename old test case

* Skip test for the UTC time, unless freeze time is used.

* Fix pylint

* Fix documentation

* Bugfix: proxy-pass the docstring of the decorated function

* Lint fix

* Fixes saltstack/salt#28262 for 2015.5 branch

* Update master config docs

* Improve git_pillar documentation/logging

* Add note about different behavior of top file in git_pillar

* Make log entry for a missing pillar SLS file more accurate for git_pillar

* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.

* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.

* Update glusterfs_test to be inline with #32312

* Fix salt-cloud paralell provisioning

Closes #31632

* Ignore Raspbian in service.py __virtual__ (#32421)

* Ignore Raspbian in service.py __virtual__

This prevents more than one execution module from trying to load as the
service virtual module.

Refs: #32413

* pack __salt__ before loading provider overrides

We can (and should) pack here since we're just packing a reference to the
object. __salt__ needs to be available when we're loading our provider
overrides

* Fix broken __salt__ dict in provider override

Using ret.items() here sets ``__salt__`` to its items (tuple containing
function name and reference), breaking usage of ``__salt__`` inside
overridden functions.

* Merge #32293 with test fixes (#32418)

* Fix issue #11497

* Remove check for working directory presence in tests

* Fix Domainname introspection

Default value needs to be extracted from the container itself,
because dockerd set Domainname value when network_mode=host.

* Add pgjsonb_queue to queue doc index

* Pylint fixes

* Pass parser options into batch mode

Resolves #31738

* Changed the target file in file.symlink test (#32443)

* Argument name in docs should match actual arg name (#32445)

Fixes #31851

* tests.integration: bypass MacOS TMPDIR, gettempdir (#32447)

Updates 0edd532, 8f558a5.

When logging in as root over `ssh root@host`, `$TMPDIR` and
`tempfile.gettempdir()` are both set to a variation of:
```
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/
```
When logging in as root over `sudo -i`, `$TMPDIR` is unset and
`tempfile.gettempdir()` is set to `/tmp`.

My guess is that the second case is an unintended or uncorrected omision
by Apple as they have introduced the longer, randomized temp path in a
recent version of MacOS.

* Issue #28706: Fix state user.present behavior. (#32448)

- As mentionned in issue #28706, state user.present no longer remove
      user from groups if the keyword 'groups' with empty value '[]' is not
      explicitly set, salt will assume current groups are still wanted.

* tests.integration: fix 4230c8a

* Move the tables of virtual modules to individual documentation pages

* Add new doc pages to toctree

* Add external ref to windows package manager docs

* Improve docstrings

* Add documentation on virtual module provider overrides to the module docs

* Clarify the scope of the provider param in states.

* Add link to provider override docs to all package providers

* Add link to provider override docs to all service providers

* Add link to provider override docs to all user providers

* dd link to provider override docs to all shadow providers

* Add link to provider override docs to all group providers

* Backport 31164 and 31364 (#32474)

* Don't send REQ while another one is waiting for response.

The message has to be removed from the queue the only *after* it's
already processed to don't confuse send() functionality that expects
empty queue means: there's no active sendings.

* Fixed zeromq ReqMessageClient destroy

* Add link to provider override docs to opkg.py

This is a companion to https://github.com/saltstack/salt/pull/32458, but
this module was not added until the 2016.3 branch, so the documentation
is being updated there for this module.

* Add documentation for some master/minion configs (#32454)

Refs #32400

Adds docs for:

- cli_summary
- event_return_queue
- event_return_whitelist
- event_return_blacklist
- file_recv_max_size
- fileserver_followsymlinks
- fileserver_ignoresymlinks
- fileserver_limit_traversal

* Automatically detect correct MySQL password column for 5.7 and fix setting passwords (#32440)

* Automatically detect MySQL password column

* Fix changing password in MySQL 5.7

* Fix lint test

* Fix unit tests (?)

They will still fail if "authentication_string" is legitimately the right column name, but I don't know what to do about that.

* Additional unit test fix

* Only unsub if we have a jid

Closes #32479
2016-04-11 17:07:15 -06:00
Erik Johnson
ae89882fed Clear VCS fsbackend and git_pillar locks on master start (#32480)
* Add functions to remove VCS fsbackend update locks and git_pillar update/checkout locks

* Clear VCS fsbackend and git_pillar locks on master start

* Fix loop in maint.flo
2016-04-11 16:56:08 -06:00
Moe
679600eb67 Add applications to win_iis (#32483) 2016-04-11 16:52:28 -06:00
Shane Lee
a6482a3171 Use win32api to get Total System Memory (#32491)
Fixes: #32327
2016-04-11 16:32:52 -06:00
Dmitry Kuzmenko
3b7ed9e8d1 Fixed message deletion from the queue for TCP. (#32486)
There is a mistake I've made in the message deletion logic when I've
updated the message sending and timeout handling code.

Found when was porting this back into 2015.8.

Thanks to @cachedout.
2016-04-11 16:27:29 -06:00
Nicole Thomas
538747a183 Merge pull request #32489 from rallytime/merge-2016.3
[2016.3] Merge forward from 2015.8 to 2016.3
2016-04-11 15:25:08 -06:00
Nicole Thomas
e335e313fe Merge pull request #32487 from terminalmage/epoch-documentation
Add explanation of nonzero epoch requirement to pkg.installed state documentation
2016-04-11 14:48:57 -06:00
rallytime
4f03f2311f Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/cli/salt.py
  - salt/modules/win_pkg.py
  - salt/transport/tcp.py
2016-04-11 14:33:21 -06:00
Nicole Thomas
e8de50ff37 Merge pull request #32482 from rallytime/merge-2015.8
[2015.8] Merge forward from 2015.5 to 2015.8
2016-04-11 14:12:26 -06:00
Erik Johnson
e04cf879b6 Document new behavior of pkg.installed for yum/dnf packages with non-zero epoch 2016-04-11 14:42:23 -05:00