Closed jcollie closed 11 years ago
/etc/systemd/system/rancid@.service:
file.managed:
- source: salt://rancid/rancid@.service
- user: root
- group: root
- mode: 0644
- require:
- pkg: rancid
- user: rancid
- file: /srv/rancid
- file: /home/rancid/.cloginrc
- file:
Found the problem, had an entry that looked like the above, note the incomplete "file" requisite. While it's true that this is a user error, having a proper error message would be useful.
Yes, this should be an easy thing to catch :)
I've already tracked it down.
W00t!
I'm about to submit a pull for this. I was able to suppress this traceback by simply skipping the requisite chunks with a value of None
. However, in the process I found that the state output looked a bit ugly, so I also changed the state output so that it's a bit more readable. @thatch45 what do you think of the following:
Old:
State: - pkgrepo
Name: deb-src http://packages.dotdeb.org wheezy-php55 all
Function: managed
Result: False
Comment: The following requisites were not found:
require: OrderedDict([('file', None)])
Changes:
New:
State: - pkgrepo
Name: deb-src http://packages.dotdeb.org wheezy-php55 all
Function: managed
Result: False
Comment: The following requisites were not found:
require:
file: None
Changes:
+1 from me. I think that looks much better.
Thanks everyone for the quick turnaround!
No prob! Don't hesitate to let us know if you encounter any other problems.
Getting the following traceback on 0.16.0 and 0.16.2. Not really sure where to begin to debug this.
Traceback (most recent call last): File "/usr/bin/salt-call", line 11, in
salt_call()
File "/usr/lib/python2.7/site-packages/salt/scripts.py", line 76, in salt_call
client.run()
File "/usr/lib/python2.7/site-packages/salt/cli/init.py", line 265, in run
caller.run()
File "/usr/lib/python2.7/site-packages/salt/cli/caller.py", line 129, in run
ret = self.call()
File "/usr/lib/python2.7/site-packages/salt/cli/caller.py", line 70, in call
ret['return'] = func(_args, *kwargs)
File "/usr/lib/python2.7/site-packages/salt/modules/state.py", line 283, in sls
ret = st.state.callhigh(high)
File "/usr/lib/python2.7/site-packages/salt/state.py", line 1508, in call_high
ret = self.call_chunks(chunks)
File "/usr/lib/python2.7/site-packages/salt/state.py", line 1275, in call_chunks
running = self.call_chunk(low, running, chunks)
File "/usr/lib/python2.7/site-packages/salt/state.py", line 1445, in call_chunk
running = self.call_chunk(chunk, running, chunks)
File "/usr/lib/python2.7/site-packages/salt/state.py", line 1385, in call_chunk
status = self.check_requisite(low, running, chunks, True)
File "/usr/lib/python2.7/site-packages/salt/state.py", line 1325, in check_requisite
if (fnmatch.fnmatch(chunk['name'], req_val) or
File "/usr/lib64/python2.7/fnmatch.py", line 43, in fnmatch
return fnmatchcase(name, pat)
File "/usr/lib64/python2.7/fnmatch.py", line 75, in fnmatchcase
res = translate(pat)
File "/usr/lib64/python2.7/fnmatch.py", line 87, in translate
i, n = 0, len(pat)
TypeError: object of type 'NoneType' has no len()