Commit Graph

35586 Commits

Author SHA1 Message Date
Thomas Jackson
9aac81c476 Pylint fix 2014-09-23 14:39:01 -07:00
Thomas Jackson
6225ae5145 Remove "never timeout" feature 2014-09-23 14:13:44 -07:00
Thomas Jackson
6e93b3b680 Attempt to fix race condition in return
This is due to our pinging of the minions for job returns, there is a non-zero amount of time between the job showing as "not running" on the minion and showing as recieved by the master. This will only be worse on Syndics-- so I'd recommend not using a 0 timeout value unless you have a small cluser
2014-09-23 14:13:42 -07:00
Thomas S Hatch
878ebd37f1 lint fix 2014-09-23 14:13:39 -07:00
Thomas Jackson
2075fcde77 Update docs 2014-09-23 14:13:35 -07:00
Thomas Jackson
6b91d539b8 Add tests for timeouts to client tests. In addition this makes all of the client functions have the same functionality 2014-09-23 14:13:33 -07:00
Thomas Jackson
c8f15230f5 Add CLI timeout tests to standard client tests 2014-09-23 14:13:31 -07:00
Thomas Jackson
7c2a9e9e0e Change timeout for CLI returns
This is a fix for #15905, the intent being that if you set a timeout it will actually time out. If you pass/set a timeout of 0 it will do the checking of minions etc to determine if the job is running. This seems to be a better compromise since the user/admin can decide wether to have timeouts or not
2014-09-23 14:13:29 -07:00
Thomas Jackson
783c502ceb Add localconfig to all state functions
Abstract the opts loading to a seperate function, and check a specific kwarg
2014-09-23 14:13:27 -07:00
Thomas Jackson
c59707add7 Add localconfig to highstate
This allows you to run highstate from a "root"ed directory of salt on the minion, which can include its own pillars, file_roots, modules, etc
2014-09-23 14:13:25 -07:00
Thomas Jackson
b01ff588c3 Remove the sleep, there is a better way to fix this
The problem you are running into is that since this is a daemon process when the function ends its effectively interpreter shutdown (which doesn't have to destroy all objects). By forcing the del of event it will call destroy() which sets linger and waits some period of time. This will speed up some process deaths (if zmq is quick enough) and stay around longer (potentially) if it can't send.
2014-09-23 14:13:22 -07:00
Thomas Jackson
74b20cf4a1 Don't fire events for runner/wheel execution in the reactor
This creates more or less infinite loops if you have an entry in the reactor conf that acts on all events.

Yo dawg, I heard you liked events... :)
2014-09-23 14:13:19 -07:00
Thomas Jackson
14124526ce Don't need to connect to the publish sockets, it will do that automatically when you ask for an event 2014-09-23 14:13:17 -07:00
Thomas Jackson
36594ff6e5 Make this a debug line, we see it a lot and don't really care :) 2014-09-23 14:12:57 -07:00
Thomas Jackson
6d59777e51 Fix regression in url encoded salt-api messages
Most clients that do url encoding include other data in the Content-Type field (requests for example sets "application/x-www-form-urlencoded; charset=utf-8"). This changes the api to be a more forgiving server which will make any non-list struct a list
2014-09-23 14:12:55 -07:00
Thomas Jackson
f117d96669 Add "wait_for_kill" to process_manager to avoid join() stalling forever 2014-09-23 14:12:51 -07:00
Thomas Jackson
004dd5d9db An additional race condition in shutdown-- if the signal is sent to all children 2014-09-23 14:12:46 -07:00
Thomas Jackson
a04f104465 Break on error, to avoid races and stuff 2014-09-23 14:12:45 -07:00
Thomas Jackson
ee5c115f5a Handle OSError, you will get this because the signal handler interrupts the systemcall to avoid traces like:
```
Traceback (most recent call last):
  File "/usr/lib64/python2.6/multiprocessing/process.py", line 232, in _bootstrap
    self.run()
  File "/usr/lib64/python2.6/multiprocessing/process.py", line 88, in run
    self._target(*self._args, **self._kwargs)
  File "/home/thjackso/src/salt/salt/master.py", line 308, in run_reqserver
    reqserv.run()
  File "/home/thjackso/src/salt/salt/master.py", line 506, in run
    self.__bind()
  File "/home/thjackso/src/salt/salt/master.py", line 500, in __bind
    self.process_manager.run()
  File "/home/thjackso/src/salt/salt/utils/process.py", line 180, in run
    pid, exit_status = os.wait()
OSError: [Errno 4] Interrupted system call
```
2014-09-23 14:12:42 -07:00
Thomas Jackson
f668b04329 Clean up shutdown process, since these are only in one of the child processes 2014-09-23 14:12:40 -07:00
Thomas Jackson
9cae35aad8 Add master_id to pub/ret data as ground work for multi_syndic
Conflicts:

	salt/minion.py

Conflicts:

	salt/minion.py
2014-09-23 14:12:35 -07:00
Thomas Jackson
4fac8f7d22 Add master_id to master docs 2014-09-23 14:11:51 -07:00
Thomas Jackson
54b32e6c8a Pep8 cleanup 2014-09-23 14:11:49 -07:00
Thomas Jackson
5d2851fa6d Make backoff use acceptance_wait_time 2014-09-23 14:11:46 -07:00
Thomas Jackson
0c74fa243d More code cleanup, wrap all the calls to syndics in _call_syndic 2014-09-23 14:11:44 -07:00
Thomas Jackson
92679ba3e4 Add hard coded timeout for syndic being dead 2014-09-23 14:11:42 -07:00
Thomas Jackson
977e34557c Major re-work to look more like MultiMinion 2014-09-23 14:11:40 -07:00
Thomas Jackson
b903a76628 pep8 2014-09-23 14:11:36 -07:00
Thomas Jackson
e84e287dbf Update notes 2014-09-23 14:11:32 -07:00
Thomas Jackson
34240e88ac Handle failures of upstream masters 2014-09-23 14:11:30 -07:00
Thomas Jackson
1e5ffc99f1 Basics working, can't handle restart of a master yet... 2014-09-23 14:11:27 -07:00
Thomas Jackson
263327c616 Backport processmanager
Conflicts:

	salt/master.py
2014-09-23 14:11:19 -07:00
Thomas S Hatch
3ce4387f3f Merge pull request #16001 from thatch45/ssh_fsclient
Ssh fsclient
2014-09-23 14:41:28 -06:00
Thomas S Hatch
5347af8627 Merge pull request #16044 from rallytime/requisite_docs
Clarify unless and onlyif docs
2014-09-23 14:38:47 -06:00
Thomas S Hatch
2d457e54a9 Merge pull request #16058 from cro/macports_7br
Change find_changes to compare_dicts so macports will work
2014-09-23 14:35:37 -06:00
Thomas S Hatch
07966bedc0 Merge pull request #16054 from bbinet/fix-docker-pulled-with-tag
fix docker.pulled when a tag is specified
2014-09-23 14:32:22 -06:00
Thomas S Hatch
5eaa88ee53 Merge pull request #16047 from gtmanfred/2014.7
make onlyif behave as expected.
2014-09-23 14:31:10 -06:00
Thomas S Hatch
0d4491be3d Merge pull request #16041 from rallytime/move_pepa
Move pillar/pepa.py from develop to 2014.7
2014-09-23 14:24:53 -06:00
Thomas S Hatch
e2d640962a Fix Jinja test 2014-09-23 14:02:34 -06:00
C. R. Oldham
adb54e2b2c Pylint fix. 2014-09-23 13:54:55 -06:00
C. R. Oldham
3efdc7a5e6 Add documentation. 2014-09-23 13:39:16 -06:00
C. R. Oldham
34c4dfd44d Somehow dropped the calls to salt.utils.compare_dicts 2014-09-23 13:06:57 -06:00
Bruno Binet
c093b1ee8d fix docker.pulled when a tag is specified
(fixes #15156 and #15053)
2014-09-23 18:34:18 +02:00
Daniel Wallace
05476bfbe7 make onlyif behave as expected.
If one command fails, the whole thing should be passed over
2014-09-22 20:13:29 -05:00
Erik Johnson
6d2151cf9b Merge pull request #16046 from rallytime/pylint_fix
Fix pylint errors on 2014.7
2014-09-22 20:02:30 -05:00
rallytime
4afc308c5d I missed one 2014-09-22 17:55:38 -06:00
rallytime
ad40b4dcb4 Fix pylint errors on 2014.7 2014-09-22 17:10:18 -06:00
Pedro Algarvio
f547aeae41 Merge pull request #16033 from rallytime/fix_2014.7_tests
Fix broken test on 2014.7
2014-09-23 00:09:10 +01:00
rallytime
872b312770 Clarify unless and onlyif docs 2014-09-22 16:03:04 -06:00
Samuel Smith
8c505e8446 Merge pull request #16043 from SmithSamuelM/2014.7_sam4
Clean up salt raet routing logic in prep for unique naming versus roles
2014-09-22 15:16:54 -06:00