Commit Graph

24797 Commits

Author SHA1 Message Date
Thomas S Hatch
daef86c93e Move the transport system in file client to not reuse zeromq sockets 2014-01-08 10:18:28 -07:00
Matthew Hopkins
7f197c568c on windows, switch so that colors are off by default, since it isn’t supported by the default console. —force-color can still be used if it is needed. 2014-01-08 10:30:34 -05:00
Matthew Hopkins
c360c138a5 Speeds up query of processes by using powershell to query all services at once rather than running a separate process for each service. 2014-01-08 10:07:15 -05:00
Pedro Algarvio
5285b92fdd Merge pull request #9630 from gravyboat/develop
Windows installation doc update explaining deps will be installed.
2014-01-08 04:21:14 -08:00
Pedro Algarvio
dcc47d3e2f Fix version naming. 2014-01-08 12:20:00 +00:00
Pedro Algarvio
d5a82f23f1 Merge pull request #9631 from tmartinfr/fix-doc-filter_by
Fix versionadded:: for filter_by() "default=" parameter
2014-01-08 04:18:08 -08:00
Thomas Martin
f9486f6547 Fix versionadded:: for filter_by() "default=" parameter
This parameter has been introduced by commit dbfe790a, which has not
been merged in 0.17 branch. Only in 2014.1.
2014-01-08 08:45:18 +01:00
Forrest Alvarez
cc0ca13855 Updated windows docs with a quick note to mention that the installers will install deps. 2014-01-08 03:06:43 +00:00
Erik Johnson
07a0001ae3 Fix source list issue for file.recurse states
This commit fixes #9620 for file.recurse states. The bug report was for
file.managed, but the same issue would be encountered in file.recurse
states.

Also, some of the input validation for file.recurse has been improved
and cleaned up.
2014-01-07 20:12:35 -06:00
Erik Johnson
fa7e9fc6b3 Fix file.managed traceback when source is a list
If file.managed state has a source param which is a list, and none of
the URIs in that list are found, a traceback occurs. This commit
modifies salt.modules.file.source_list to raise an exception when source
is a list and no matches are found, and then catches that exception in
the file.managed state so that Salt can return gracefully with a False
result and meaningful error message.
2014-01-07 19:12:58 -06:00
Brian Lanier
fa55291435 Add rehash method for rbenv module
- After installing gems or rubies, rbenv rehash should be run
- No harm in running it multiple times or when not strictly needed in
  the do method.
2014-01-07 16:56:14 -08:00
Thomas S Hatch
78c5d4376d Merge pull request #9623 from basepi/moduledocs
Add more state vs module clarification
2014-01-07 16:51:30 -08:00
Thomas S Hatch
e1e82a8e7c Merge pull request #9619 from terminalmage/pygit2-ssh
Limit pygit2 gitfs provider transports
2014-01-07 16:51:06 -08:00
Gareth J. Greenaway
caba63cefa Adding the ability to delete iptables rules from the iptables state. Deletes can be made in a state file using syntax similiar either the insert or an append. If the position argument is included then the delete is based on the position, without it is based on the rule. 2014-01-07 16:18:18 -08:00
Colton Myers
b43b0d5d09 Add more state vs module clarification 2014-01-07 16:55:28 -07:00
Erik Johnson
c664da142b Limit pygit2 gitfs provider transports
pygit2 doesn't yet support ssh transports properly, as seen here:

http://stackoverflow.com/questions/20956895/how-do-i-set-ssh-credentials-for-libgit2-libssh2

This commit limits pygit2 to http://, https://, and file:// URIs. Once a
compatible pygit2 version is released, we can do version checking and
allow ssh-based transports for pygit2 on supported versions.
2014-01-07 17:42:45 -06:00
Brian Lanier
d4e818fdd5 Add ruby version to gem install for rbenv
- Adds ability to specify which version of ruby to install gems into
- Similar feature to the rvm version
- Allows installing and managing multiple ruby versions
2014-01-07 14:38:30 -08:00
Thomas S Hatch
8a5b4ae780 Merge pull request #9618 from thematthopkins/windows_runnable_source
Allows salt minion to run directly from source on Windows
2014-01-07 13:15:24 -08:00
Matthew Hopkins
e76ce1d9e0 fix to use salt.utils.is_windows instead of sys.platform 2014-01-07 16:09:21 -05:00
Thomas S Hatch
eed28bcbf5 Merge pull request #9617 from amco/add-rbenv-ruby-build-configure-env
Add ruby build configure options to rbenv module
2014-01-07 13:04:49 -08:00
David Boucha
bdece37b30 Merge pull request #9609 from thematthopkins/windows_highstate_cache_fix
fix for windows masterless read-only highstate.cache.p file
2014-01-07 12:51:16 -08:00
Matthew Hopkins
5e24c76988 Allows salt to run directly from source on Windows 2014-01-07 15:43:27 -05:00
Matthew Hopkins
f4ff22d92a windows highstate cache fix 2014-01-07 13:57:39 -05:00
Matthew Hopkins
c6849ececd highstate windows masterless fix 2014-01-07 13:54:43 -05:00
Matthew Hopkins
26e94fe124 no message 2014-01-07 13:41:44 -05:00
Brian Lanier
864f936046 Add ruby build configure options to rbenv module
- Allows you to pass in configure options to ruby build environment when
  building rubies via rbenv
2014-01-07 10:40:28 -08:00
Thomas S Hatch
87b25ed67a Merge pull request #9601 from terminalmage/docs
Replace references to Hydrogen release in docs
2014-01-07 10:26:31 -08:00
Thomas S Hatch
b2b56a2560 Fix format strings for python 2.6 2014-01-07 11:21:30 -07:00
Thomas S Hatch
9ee2f2228c Merge pull request #9612 from Psycojoker/develop
More debug output on cmd.run in case of missing cwd
2014-01-07 10:15:16 -08:00
Erik Johnson
2d5c9d9136 Rename 2014.01.0.rst to 2014.1.0.rst 2014-01-07 12:09:06 -06:00
Erik Johnson
0b876b2813 correct 2014.01.0 -> 2014.1.0 2014-01-07 12:08:58 -06:00
Erik Johnson
6ab77e5317 Replace references to Hydrogen release in docs
This replaces references to Hydrogen (in versionadded/versionchanged
directives as well as a few other mentions), to reflect the actual
release number of 2014.1.0.
2014-01-07 12:06:53 -06:00
Thomas S Hatch
4bb70f57d3 Merge pull request #9615 from terminalmage/issue9527
Fix regression in salt.utils.copyfile()
2014-01-07 09:56:47 -08:00
Erik Johnson
dc01443085 Fix regression in salt.utils.copyfile()
In pull request #9599, I added code to make salt.utils.copyfile() set
the ownership and permissions of the new file to those of the
pre-existing file. However, this raises an exception when the
destination file doesn't exist, which happens on file.managed states
which are creating new files.

This commit fixes that regression.
2014-01-07 11:47:08 -06:00
Laurent Peuch
ae807b6817 More debug output on cmd.run in case of missing cwd 2014-01-07 18:07:31 +01:00
Thomas S Hatch
9ab823ae05 Merge pull request #9611 from terminalmage/spelling-fixes
spelling fixes
2014-01-07 08:56:18 -08:00
Erik Johnson
4cf7ffd719 spelling fixes 2014-01-07 10:53:18 -06:00
Thomas S Hatch
3152e26b6f Merge pull request #9610 from thematthopkins/win_file_stats_follow_symlinks_fix
Addresses the issue:  Unable to manage file: stats() got an unexpected keyword argument 'follow_symlinks’
2014-01-07 08:21:35 -08:00
Matthew Hopkins
d541501870 Addresses the issue: Unable to manage file: stats() got an unexpected keyword argument 'follow_symlinks’ 2014-01-07 11:18:34 -05:00
Matthew Hopkins
5a2ff3a641 fix for windows masterless read-only highstate.cache.p file 2014-01-07 10:40:35 -05:00
Thomas S Hatch
752971a21b Merge pull request #9600 from terminalmage/file-module-cleanup
Some "DRY" cleanup in the file module
2014-01-06 21:26:34 -08:00
Thomas S Hatch
e57038ba17 Merge pull request #9599 from terminalmage/issue9527
Fix ownership/perms on salt.utils.copyfile()
2014-01-06 21:24:56 -08:00
Thomas S Hatch
3f16b1b023 Merge pull request #9603 from techhat/jcl
Clarify that execution modules and state modules are not the same thing
2014-01-06 21:23:55 -08:00
Thomas S Hatch
bd0aa8a3ef Merge pull request #9602 from getlantern/develop
Fix the following crash in a minion when master executes
2014-01-06 21:22:26 -08:00
Joseph Hall
214843c53b Clarify that execution modules and state modules are not the same thing 2014-01-06 19:57:01 -07:00
Spider Person
a7e874bae6 Fix the following crash in a minion when master executes
state.highstate on it.

    2014-01-07 01:45:43,315 [salt.minion      ][INFO    ] User sudo_ubuntu Executing command state.highstate with jid 20140107014542797484
    2014-01-07 01:45:43,332 [salt.minion      ][WARNING ] The minion function caused an exception: Traceback (most recent call last):
      File "/usr/local/lib/python2.7/dist-packages/salt/minion.py", line 626, in _thread_return
        '''
      File "/usr/local/lib/python2.7/dist-packages/salt/modules/state.py", line 237, in highstate
        conflict = running()
      File "/usr/local/lib/python2.7/dist-packages/salt/modules/state.py", line 91, in running
        active = __salt__['saltutil.is_running']('state.*')
      File "/usr/local/lib/python2.7/dist-packages/salt/modules/saltutil.py", line 365, in is_running
        '''
      File "/usr/local/lib/python2.7/dist-packages/salt/modules/saltutil.py", line 396, in running
        continue
    AttributeError: 'module' object has no attribute 'os_is_running'

    2014-01-07 01:45:43,333 [salt.minion      ][INFO    ] Returning information for job: 20140107014542797484
2014-01-07 02:51:08 +01:00
Erik Johnson
7d4c470f91 Some "DRY" cleanup in the file module
The get_{uid,gid,user,group,mode} functions duplicate a lot of work done
in file.stats. this commit changes file.stats slightly to support
getting uid/gid of broken symlinks (code that was in get_{uid,gid}), and
then uses file.stats to supply the uid, gid, etc. for the get_*
functions.

Additionally, the "follow_symlinks" behavior in file.stats is opposite
from everywhere else in the file module, so the default value for this
parameter has been changed to True, and refs to this function from the
file state has been manually passed as False to preserve backwards
compatibility.
2014-01-06 18:55:44 -06:00
Erik Johnson
08539fff38 Fix ownership/perms on salt.utils.copyfile()
When salt.utils.copyfile() uses shutil.move() to move the target file to
the destination, the ownership/permissions from the original file that
existed at the destination path are not preserved. For security reasons,
files cached locally and compared to existing files in file.managed
states are created with ownership of root:root (or user:primarygroup, if
the master is running as non-root), with a mode of 600.

Normally, this would not be an issue since
salt.modules.file.check_perms() is invoked to correct the ownership and
permissions. However, recent modifications to that function have
resulted in the ownership/permissions not being modified if these
parameters are passed to check_perms() as None.

Since the user, group, and mode default to None in file.managed states,
if they are not explicitly defined in a state, this results in is the
newly-created file overwriting the old file, and the
ownership/permissions being left untouched.

This commit modifies salt.utils.copyfile() to restore the old file's
ownership and permissions after shutil.move is invoked to replace the
old file with the new one.

Fixes #9527.
2014-01-06 18:46:56 -06:00
Thomas S Hatch
2ddfd74d08 Merge pull request #9598 from jacksontj/develop
Fix for pillar loading and comment update
2014-01-06 16:33:22 -08:00
Thomas Jackson
3cbec617ba Make sure we load ufnctions in ALL situations 2014-01-06 16:31:53 -08:00