saltstack/salt — Issue #418: sysctl modele does not check for value in assign
Author: thatch45
Created: 2012-01-04 05:51:21+00:00
State: open

This can cause a trace when things are misspelled (easy for me to find):

22:39:01,491 [cmd ][INFO ] Executing command sysctl -w vm.swappines=14 in directory /root
Traceback (most recent call last):
File "/usr/bin/salt-call", line 19, in
main()
File "/usr/bin/salt-call", line 15, in main
client.run()
File "/usr/lib64/python2.6/site-packages/salt/cli/__init__.py", line 624, in run
caller.run()
File "/usr/lib64/python2.6/site-packages/salt/cli/caller.py", line 97, in run
ret = self.call()
File "/usr/lib64/python2.6/site-packages/salt/cli/caller.py", line 37, in call
*self.opts['arg']
File "/usr/lib64/python2.6/site-packages/salt/modules/state.py", line 79, in highstate
return st_.call_highstate()
File "/usr/lib64/python2.6/site-packages/salt/state.py", line 963, in call_highstate
return self.state.call_high(high)
File "/usr/lib64/python2.6/site-packages/salt/state.py", line 678, in call_high
ret = self.format_verbosity(self.call_chunks(chunks))
File "/usr/lib64/python2.6/site-packages/salt/state.py", line 514, in call_chunks
running = self.call_chunk(low, running, chunks)
File "/usr/lib64/python2.6/site-packages/salt/state.py", line 655, in call_chunk
running[tag] = self.call(low)
File "/usr/lib64/python2.6/site-packages/salt/state.py", line 498, in call
ret = self.states[cdata['full']](*cdata['args'])
File "/usr/lib64/python2.6/site-packages/salt/states/sysctl.py", line 34, in present
update = __salt__['sysctl.persist'](name, value, config)
File "/usr/lib64/python2.6/site-packages/salt/modules/linux_sysctl.py", line 107, in persist
assign(name, value)
File "/usr/lib64/python2.6/site-packages/salt/modules/linux_sysctl.py", line 60, in assign
ret[comps[0]] = comps[1]