Commit Graph

18358 Commits

Author SHA1 Message Date
Chris Rebert
6352bfab31 modules.freebsdpkg: rm unused import of 'os'
salt/modules/freebsdpkg.py:73: [W0611(unused-import), ] Unused import os
2013-09-24 19:30:40 -07:00
Chris Rebert
13054e3bb2 modules.freebsdpkg.list_pkgs: fix except syntax
salt/modules/freebsdpkg.py:241: [W0623(redefine-in-handler), list_pkgs] Redefining name 'ValueError' from builtins in exception handler
2013-09-24 19:30:38 -07:00
Chris Rebert
a93bdcefab modules.pkgng.list_pkgs: fix except syntax
salt/modules/pkgng.py:297: [W0623(redefine-in-handler), list_pkgs] Redefining name 'ValueError' from builtins in exception handler
2013-09-24 19:30:34 -07:00
Mickey Malone
8025c47ae3 Symlink support in file.recurse 2013-09-24 21:29:52 -05:00
mafro
3bfdd22168 E501 and whitespace 2013-09-25 11:06:33 +10:00
mafro
40cfa293d0 make supervisor understand process groups 2013-09-25 11:06:33 +10:00
Thomas S Hatch
ab62ae9584 Merge pull request #7438 from terminalmage/bsd-pkg-rewrite
Rewrite FreeBSD package management
2013-09-24 17:08:14 -07:00
Thomas S Hatch
5e9b4363e7 Merge pull request #7437 from terminalmage/issue6495
Fix corruption of files pushed to master with cp.push
2013-09-24 16:13:55 -07:00
Erik Johnson
da3e157e0c Fix corruption of files pushed to master with cp.push
salt.master.AESFuncs._file_recv(), which receives the files transmitted
using the cp.push execution function, is executed once for each chunk
received. However, it was opening the filehandle using a 'w' or 'w+'
mode, which always truncates the file. So, when a file that exceeds the
size of the file_buffer_size minion config option (default: 262144
bytes), is pushed to the minion, and is thus sent in more than one
chunk, the file on the master is truncated. The filehandle then seeks to
the offset location of the chunk that was transmitted and writes the
chunk.

With the file being truncated every time a chunk is written, the result
is a file which contains null bytes everywhere but the final chunk,
causing the file to be corrupted.

This commit changes salt.master.AESFuncs._file_recv() so that it opens
the file for appending (instead of writing) if the destination file on
the master exists and the offset is nonzero. Otherwise, the file is
opened for writing.
2013-09-24 18:02:21 -05:00
Pedro Algarvio
c1722e3ea4 Created format_call_defaults() as a helper to format_call and a future decorator. 2013-09-24 22:08:08 +01:00
Pedro Algarvio
a9d5ac5a3e Add unit tests to salt.utils.format_call(). 2013-09-24 22:08:08 +01:00
Pedro Algarvio
96ec0eed0a Improve format_call keyword arguments passing.
Pass keyword arguments as keyword arguments, not as arguments.
2013-09-24 22:08:08 +01:00
Pedro Algarvio
4a18003231 Error signatures changed, lets update test cases. 2013-09-24 22:08:08 +01:00
Pedro Algarvio
c6790a1ec7 Improved logging messages formatting. 2013-09-24 22:08:08 +01:00
Pedro Algarvio
4022125593 SaltInvocationError now also subclasses TypeError. 2013-09-24 22:08:08 +01:00
Pedro Algarvio
528ee3ae14 salt.utils.decorators is now a package. 2013-09-24 22:08:08 +01:00
Pedro Algarvio
6f53c6dbae Use the already existing context keyword. 2013-09-24 22:08:08 +01:00
Pedro Algarvio
26bac77312 Formatting, Coding Style and PEP-8. 2013-09-24 22:08:08 +01:00
Pedro Algarvio
83d23d9be7 Use salt.utils.is_windows(). 2013-09-24 22:08:08 +01:00
Pedro Algarvio
8b56fd7966 Instead of failing, let's return warnings to the user to know what's going on. 2013-09-24 22:08:08 +01:00
Pedro Algarvio
ba807246a8 Updated docstring. Double to single quotes. 2013-09-24 22:08:08 +01:00
Pedro Algarvio
bacd2264ee State calls now fail if non-supported arguments are used. Fixes #6962.
* Removed `format_call` from `salt.state.State` since it was almost a one to one copy of `salt.utils.format_call`.
* The `format_call` in `salt.utils` was modified to accept initial return data(to provide the functionality from the removed `State.format_call`.
* While the function arguments are being queried/matched, those used are removed from a copy of the passed data. Once finished, any remaining keyword arguments which do not match those allowed on the `expected_extra_kws` keyword argument to `format_call` will raise a `SaltInvocationError`.

This will prevent any future bogus bug searching like what happened on #6912 because the wrong state function argument was being passed.
2013-09-24 22:08:07 +01:00
Thomas S Hatch
65cc54bcad Merge pull request #7434 from terminalmage/issue7371
Properly identify Raspbian to fix service/pkg support
2013-09-24 11:41:51 -07:00
Thomas S Hatch
6829daaf9c Merge pull request #7435 from holmboe/rh_ip-templates-dir
Move jinja template files into salt/templates
2013-09-24 11:41:08 -07:00
Henrik Holmboe
ee53d10f74 Shouldn't put a newline there 2013-09-24 20:17:22 +02:00
Seth House
2f8393478b Updated versions for file.replace file.search functions
This is going out with 0.17 instead of 0.17.1.
2013-09-24 12:04:28 -06:00
Erik Johnson
5495a5fdca Fix traceback in service.py when OS not identified
If the OS was not properly identified, salt/modules/service.py is used
as a fallback provider for the service module/state. However, the way it
looks up the location of the initscripts directory results in a
traceback if the OS grain isn't in the lookup dict.

This commit simplifies the lookup dict and has the module use
/etc/init.d as the location for initscripts if the 'os' grain is not in
the lookup dict, fixing this traceback.
2013-09-24 12:38:14 -05:00
Erik Johnson
a3339d9b81 Use debian_service as service provider for Raspbian 2013-09-24 12:37:41 -05:00
Erik Johnson
2e2c037e87 Properly identify Raspbian 2013-09-24 12:29:48 -05:00
Henrik Holmboe
8960189d22 Move jinja template files into salt/templates
See #7291. This is the first step.
2013-09-24 17:04:41 +02:00
Joseph Hall
1d671b6f6b Merge pull request #7431 from s0undt3ch/hotfix/lint
Fix `pep8` `W291` and `E231` issues.
2013-09-24 07:04:24 -07:00
Pedro Algarvio
59ca8054bb Minor formatting changes. Double to single quotes. 2013-09-24 13:47:11 +01:00
Pedro Algarvio
dc094cb73a Fix pep8 W291 and E231 issues.
* W291: Trailing white space
* E231: Missing white-space after comma.
2013-09-24 13:42:55 +01:00
Pedro Algarvio
530906d21b Merge pull request #7429 from s0undt3ch/develop
Don't fail if `salt._compat` cannot be imported. Refs #7426. Fixes #7425.
2013-09-24 05:37:29 -07:00
Pedro Algarvio
b3b915c41f Merge pull request #7421 from cvrebert/patch-1
pillar/django_orm.py: copyedits
2013-09-24 03:24:58 -07:00
Pedro Algarvio
1d25e44640 Merge pull request #7428 from holmboe/publish-docstring
Whitespace & punctuation changes to docstring in publish.py
2013-09-24 03:23:14 -07:00
Pedro Algarvio
c119e8ed54 Merge pull request #7430 from holmboe/pythonic-test
Make test more pythonic
2013-09-24 03:22:26 -07:00
Henrik Holmboe
53a74ffca0 Make test more pythonic 2013-09-24 12:10:05 +02:00
Pedro Algarvio
81f960a389 Don't fail if salt._compat cannot be imported. Refs #7426. Fixes #7425. 2013-09-24 11:02:51 +01:00
Henrik Holmboe
cfaf41fe01 Minor docstring changes to publish.py 2013-09-24 11:53:03 +02:00
Chris Rebert
9329d8d887 pillar/django_orm.py: copyedits 2013-09-23 23:10:46 -07:00
Thomas S Hatch
905cb8fa8c Fix pylint issues in master.py 2013-09-23 23:32:07 -06:00
Thomas S Hatch
994413d019 fix pylint error 2013-09-23 23:31:22 -06:00
Thomas S Hatch
0486dd31bb Merge pull request #7416 from mlister2006/develop
Replacing pull request #7178 with this. Adding file:// URL support for mako template and mine_get acl support (Issue#5467)
2013-09-23 22:23:09 -07:00
Thomas S Hatch
8b7b2e5ea9 Merge pull request #7410 from boltronics/git_state_fixes
git state to update repo where rev = branch name
2013-09-23 22:21:38 -07:00
Thomas S Hatch
dccac18693 Merge pull request #7418 from micahhausler/bugfix/django_orm
Fixed param error in django_orm ext_pillar
2013-09-23 22:20:31 -07:00
Thomas S Hatch
97e21b02f0 Add --roster-file option salt-ssh 2013-09-23 23:17:17 -06:00
Thomas S Hatch
6c51e45af5 Add roster help message for more clarity 2013-09-23 23:15:07 -06:00
Thomas S Hatch
2c8c752437 Allow for roster_file option in master config 2013-09-23 23:12:26 -06:00
Joseph Hall
77764eba24 Merge pull request #7420 from cvrebert/patch-1
faq.rst: fix typo
2013-09-23 12:07:21 -07:00