Commit Graph

38484 Commits

Author SHA1 Message Date
Thomas S Hatch
d8f4160170 Merge pull request #21510 from twangboy/win_service
Fixed disable function in win_service.py to actually disable service
2015-03-10 15:14:31 -06:00
Thomas S Hatch
1c31dbfa9e Merge pull request #21497 from xclusv/2014.7-fix-php-composer
Backport of PR #21358 to 2014.7
2015-03-10 15:12:30 -06:00
twangboy
ed1b7dd6e4 Fixed disable function in win_service.py to actually disable service 2015-03-10 13:08:26 -07:00
Ross Perkins
8083cf554d Backport of PR #21358 to 2014.7 2015-03-10 09:38:16 -07:00
Thomas S Hatch
f6f6afef76 Merge pull request #21488 from jacobhammons/2014.7
Regenerated and updated man pages, updated release version in conf.py to...
2015-03-10 09:31:38 -06:00
Jacob Hammons
921d679065 Regenerated and updated man pages, updated release version in conf.py to 2014.7.2 2015-03-10 09:22:57 -06:00
Vincent Desjardins
aef0d95551 fix pylint error in virt module. 2015-03-10 09:17:48 -06:00
Vincent Desjardins
d5293901bc fixes #20198: virt.get_graphics and virt.get_nics calls in module virt 2015-03-10 09:17:48 -06:00
Thomas S Hatch
6ac6a53302 Merge pull request #21437 from rallytime/bp-21409
Backport #21409 to 2014.7
2015-03-09 14:21:48 -06:00
Thomas S Hatch
4fb4178f06 Merge pull request #21439 from jfindlay/no_master
remove 'master' reference in error message
2015-03-09 13:33:00 -06:00
Thomas S Hatch
87591b37e7 Merge pull request #21432 from eliasp/2014.7-fix-21304
Fix #21304 (backport of #21431)
2015-03-09 13:27:19 -06:00
Justin Findlay
3456ef610e remove 'master' reference in error message
Remove an erroneous reference to a 'master' in render_highstate as the
error can be triggered when salt is run masterless, #21301.
2015-03-09 12:18:16 -06:00
Jeff Quast
8a65d8c593 Gracefully handle race condition in `makedirs'
Problem
-------

In the imperative sequence::

   if not os.path.isdir(folder_name):
       os.makedirs(folder_name)

There exists the possibility that another process may create ``folder_name``
between the system path test and the system folder construction.  This is
especially true when launching both the salt-minion and salt-master
simultaneously::

    # systemctl status -l salt-minion salt-master
    * salt-minion.service - The Salt Minion
       Loaded: loaded (/usr/lib/systemd/system/salt-minion.service; enabled)
       Active: inactive (dead) since Sat 2015-03-07 21:38:53 UTC; 7h ago
      Process: 1168 ExecStart=/usr/bin/salt-minion (code=exited, status=0/SUCCESS)
     Main PID: 1168 (code=exited, status=0/SUCCESS)

    Mar 07 21:36:29 local.dev systemd[1]: Started The Salt Minion.
    Mar 07 21:38:53 local.dev salt-minion[1168]: [ERROR   ] Attempt to authenticate with the salt master failed

    * salt-master.service - The Salt Master Server
       Loaded: loaded (/usr/lib/systemd/system/salt-master.service; enabled)
       Active: failed (Result: exit-code) since Sat 2015-03-07 21:37:53 UTC; 7h ago
      Process: 1166 ExecStart=/usr/bin/salt-master (code=exited, status=17)
     Main PID: 1166 (code=exited, status=17)

    Mar 07 21:37:52 local.dev salt-master[1166]: Failed to create path "/var/log/salt/master" - [Errno 17] File exists: '/var/log/salt'
    Mar 07 21:37:53 local.dev systemd[1]: salt-master.service: main process exited, code=exited, status=17/n/a
    Mar 07 21:37:53 local.dev systemd[1]: Failed to start The Salt Master Server.
    Mar 07 21:37:53 local.dev systemd[1]: Unit salt-master.service entered failed state.

In such cases, the salt-minion tested for the non-existence (true), then
salt-master also tested (true).  salt-minion created the folder, but
salt-master failed (with Errno 17: File exists).

Solution
--------

Do not test for path existence at all, always create, expecting errno.EEXISTS
as an acceptable condition.  This delegates responsibility of handling such
"race conditions" to the kernel where locks exist to prevent it.
2015-03-09 11:58:36 -06:00
Elias Probst
1ff5cc2c70 Fix #21304
blkid() was iterating over an empty list before checking it's length.
Prevent this by using 'cmd.run_all' instead and checking it's returncode
before using the results.
2015-03-09 18:11:40 +01:00
David Boucha
7a77375829 Merge pull request #21407 from freimer/issue_21405
Added status.master capability for Windows
2015-03-09 10:55:17 -06:00
Thomas S Hatch
c5db184f54 Merge pull request #21411 from terminalmage/issue20812
Fix file.recurse on root of gitfs/hgfs/svnfs repo
2015-03-09 10:55:01 -06:00
Thomas S Hatch
cd5463d610 Merge pull request #21380 from lorengordon/service-running-logic-conflict
Fix logic conflict with `enabled` between service.running and service.dead
2015-03-09 10:48:19 -06:00
Erik Johnson
cf05fd6322 Fix file.recurse on root of svnfs repo
This fixes a condition where a file.recurse fails on the root of an
svnfs repo when the repo has a mountpoint. See #20812.
2015-03-08 01:07:05 -06:00
Erik Johnson
346f59c6e5 Fix file.recurse on root of hgfs repo
This fixes a condition where a file.recurse fails on the root of an hgfs
repo when the repo has a mountpoint. See #20812.
2015-03-08 01:06:39 -06:00
Erik Johnson
6f6f4b9ce0 Fix file.recurse on root of gitfs repo
This fixes a condition where a file.recurse fails on the root of a gitfs
repo when the repo has a mountpoint. See #20812.
2015-03-07 23:13:14 -06:00
Fred Reimer
03c9e70de8
Added status.master capability for Windows
This fixes issue_21405, and allows Windows minions to auto-failover if configured
for multi-master mode and failover.
2015-03-07 20:23:07 -05:00
Fred Reimer
fa0953c50b
Added status.master capability for Windows
This fixes issue_21405, and allows Windows minions to auto-failover if configured
for multi-master mode and failover.
2015-03-07 20:07:39 -05:00
Nicole Thomas
e2f135a409 Merge pull request #21395 from jacksontj/2014.7
Backport fix for #20494
2015-03-06 18:38:00 -07:00
Thomas Jackson
ff8b47c61a Catch case where 'return' not in opts, or other ways to get an empty returner (as it will just fail anyways) 2015-03-06 16:35:37 -08:00
Thomas S Hatch
fea6d83c36 Merge pull request #21355 from The-Loeki/patch-1
Fix for comments containing whitespaces
2015-03-06 17:27:33 -07:00
Thomas S Hatch
3736c8972d Merge pull request #21373 from hvnsweeting/2014.7
bugfix: fix test mode in ssh_known_hosts
2015-03-06 17:27:14 -07:00
C. R. Oldham
93c5d92a77 AGH. LINT. 2015-03-06 17:22:54 -07:00
Loren Gordon
6e4e9d57be Streamline logic, cleanup dead code 2015-03-06 15:41:00 -05:00
Loren Gordon
6f161a7c77 Re-add stateful return for service.enabled and service.disabled
Modifies `service.enabled` and `service.disabled` so they work properly
with the changes to the return value of `_enable()` and `_disable()`.
2015-03-06 15:40:59 -05:00
Loren Gordon
91f499ec28 Eliminate enable logic conflict
Fixes saltstack#20915

Modifies `service.running` and `service.dead` to update the `ret`
variable based on the return value of `_enable()` or `_disable()`.
Modifies `_enable()` and `_disable()` so they return a dict that only
contains keys changed by the referenced function (rather than a full
state dict).
2015-03-06 15:40:59 -05:00
Ronald van Zantvoort
bf6790b969 Update ssh_auth.py 2015-03-06 20:51:47 +01:00
Nicole Thomas
855d8cf791 Merge pull request #21381 from rallytime/pylint_seven
Pylint fix for 2014.7 branch
2015-03-06 12:14:26 -07:00
Ronald van Zantvoort
10089ab4d9 Fix pylint PEP8 E231, patch absent function as well 2015-03-06 19:55:53 +01:00
C. R. Oldham
b3ff3ab262 More lint. 2015-03-06 11:22:11 -07:00
Viet Hung Nguyen
2a845989b7 bugfix: fix test mode in ssh_known_hosts
- present func: should not require key/fingerprint.
  In normal mode, key AND fingerprint can be omitted but
  test mode requires them, so fix the test mode to behave same
  way.
- absent function: return correct ret when change suppose to be made.
- refactor a bit.
2015-03-07 00:58:32 +07:00
rallytime
b9f3b79cc6 Pylint fix for 2014.7 branch 2015-03-06 10:56:53 -07:00
C. R. Oldham
f52542535a Fix typo. 2015-03-06 10:35:33 -07:00
C. R. Oldham
780c07b279 Fix lint. 2015-03-06 10:34:13 -07:00
Thomas S Hatch
096021b43c Merge pull request #21374 from sivann/Issue_21218
better grains.virtual through systemd-detect-virt and virt-what, fixes issue #21218
2015-03-06 09:01:39 -07:00
Thomas S Hatch
7e565526fe Merge pull request #21310 from devweasel/issue_21114
Fixes for #21114
2015-03-06 08:59:02 -07:00
Thomas S Hatch
be4405f43d Merge pull request #21346 from sinnerschrader/fix/2014_7_fix_ubuntu_network_bonding
* fixes states.network bonding for debian
2015-03-06 08:56:16 -07:00
Thomas S Hatch
1c23c1f784 Merge pull request #21360 from terminalmage/issue21300
Fix traceback in sysctl.present state output
2015-03-06 08:45:41 -07:00
Thomas S Hatch
00323f03d0 Merge pull request #21366 from d--j/fix-debian-ip-dns-nameservers
Make debian_ip.get_interface not remove dns-nameservers
2015-03-06 08:43:18 -07:00
Spiros Ioannou
15c371d02a correct string for microsoft and vmware 2015-03-06 16:37:37 +02:00
Spiros Ioannou
9d4fcdd34c better grains.virtual through systemd-detect-virt and virt-what, fixes issue #21218 2015-03-06 16:24:36 +02:00
Daniel Jagszent
32c7547de2 Make debian_ip not remove dns-nameservers
Do not translate debian style attributes to salt style attributes in
_parse_interfaces. The `iface_dict` expects the debian style
attribute names anyway.

Fixes #18318 (in 2014.7 and up, the part of missing options, not the
removing coments part)
2015-03-06 02:13:38 +01:00
Erik Johnson
13221816cc Fix traceback in sysctl.present state output
Also fixed a lot of line > 79 columns issues.

Resolves #21300.
2015-03-05 14:11:16 -07:00
Ronald van Zantvoort
6327479a03 Fix for comments containing whitespaces
When comments contain whitespaces they won't be copied over currently.
This is because the split keeps splitting along the whitespaces.

Reproduce:
```
name = "ecdsa-sha2-nistp256 awesomlylongkey= The Loeki proposes a fix for this"
```
2015-03-05 19:35:02 +01:00
Marvin Frick
fc7ee455fb * fixes states.network bonding for debian
* remove duplicate 'mode' from bridge as well

* fixes output for bond slave interfaces

* fixes minor typo

* fixes bonding example

--
Squashed working commits into one PR commit
2015-03-05 12:19:26 +01:00
jfindlay
a5a14ffd6f Merge pull request #21308 from s0undt3ch/2014.7
[2014.7] Update the bootstrap script to latest stable v2015.03.04
2015-03-04 11:01:03 -07:00