Commit Graph

24571 Commits

Author SHA1 Message Date
Matthew Hopkins
5e24c76988 Allows salt to run directly from source on Windows 2014-01-07 15:43:27 -05: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
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
Thomas S Hatch
4130693d34 the jobid section CLEARLY does not work, stubbing out for now
I also made the first arguments name and made backdoors for limit
and job arguments
2014-01-06 17:25:26 -07:00
Thomas S Hatch
94db5c4669 Do! if, not elif 2014-01-06 17:17:05 -07:00
David Boucha
6a1037054a Merge pull request #9597 from UtahDave/develop
slight doc reformat on windows install doc page
2014-01-06 15:07:57 -08:00
David Boucha
162776c4f1 slight doc reformat on windows install doc page 2014-01-06 16:07:26 -07:00
Thomas S Hatch
340aed8049 Attempt at fixing some of the pillar platform tests 2014-01-06 15:13:37 -07:00
David Boucha
abea1b7c36 Merge pull request #9596 from jacksontj/develop
Break out the function loading into a seperate if block
2014-01-06 13:36:58 -08:00
Thomas Jackson
f9e6efebf8 Break out the function loading into a seperate if block 2014-01-06 13:34:57 -08:00
Thomas S Hatch
9fb46bd916 Merge pull request #9595 from jacksontj/develop
Keep the functions if they are passed in
2014-01-06 13:34:00 -08:00
Thomas Jackson
472494ea7b Keep the functions if they are passed in 2014-01-06 13:30:38 -08:00
Thomas S Hatch
4228f1a9bc Make the functions only get generated once instead of every pillar 2014-01-06 14:16:35 -07:00
Thomas S Hatch
cc5a96f79f Merge pull request #9591 from davidn/develop
Make mysql returner use json to serializer return
2014-01-06 11:48:51 -08:00
David Newgas
2db07a9fe3 Make mysql returner use json to serializer return
See issue #9590

Using str to serializer data is a bad idea as there is no good way
to safely and reliable deserialize it. JSON allows this, and is what
the postgresql returner uses.
2014-01-06 11:44:35 -08:00
Thomas S Hatch
ad526c972f Merge pull request #9588 from dmyerscough/fix-init-script
Fix init script
2014-01-06 10:47:56 -08:00
Damian Myerscough
65cde36f94 Fix #9511 multiple PID's cause unary operator expected 2014-01-06 19:46:33 +01:00
Damian Myerscough
4f30065911 Merge branch 'fix-init-script' of https://github.com/dmyerscough/salt into fix-init-script 2014-01-06 19:43:20 +01:00
Damian Myerscough
c6ed4980dc Fix #9511 multiple PID's cause unary operator expected 2014-01-06 19:41:34 +01:00
Pedro Algarvio
8e7a8e2d8b Fix some of the lint issues 2014-01-06 17:25:22 +00:00
Thomas S Hatch
6930733ff8 Merge pull request #9585 from s0undt3ch/develop
Lint Fixes
2014-01-06 09:19:10 -08:00
Pedro Algarvio
d47c162732 Merge pull request #9586 from terminalmage/gitfs-pygit2
Fix travis failures from merge of #9566
2014-01-06 09:16:01 -08:00
Erik Johnson
421c32625f Fix travis failures from merge of #9566 2014-01-06 11:12:45 -06:00
Pedro Algarvio
ec2f78146c Fix inline code related lint issues. 2014-01-06 17:11:20 +00:00
Pedro Algarvio
3af5f5d6aa Fix lint issues. Simplify options building logic. 2014-01-06 17:06:49 +00:00
Thomas S Hatch
7a09c236d5 Merge pull request #9584 from nshalman/smartos-esky
SmartOS esky build tooling
2014-01-06 08:42:05 -08:00
Thomas S Hatch
04f06b6798 Merge pull request #9583 from halfss/patch-1
not env when minion not in the top.sls
2014-01-06 08:28:37 -08:00
Thomas S Hatch
77050b166a Merge pull request #9581 from ticosax/fix-docker-restarting-mod-watch
status was not defined and restarter will always restart
2014-01-06 08:26:50 -08:00
Thomas S Hatch
519ca61af2 Merge pull request #9580 from ticosax/develop
Move privileged argument from create_container() to start()
2014-01-06 08:26:40 -08:00