mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
If a state is in prerequired, do not add to the self.pre to the list of requirements.
This commit is contained in:
parent
d9dcb84fe3
commit
3ffab16a4d
@ -2236,7 +2236,7 @@ class State(object):
|
||||
fun_stats = set()
|
||||
for r_state, chunks in six.iteritems(reqs):
|
||||
req_stats = set()
|
||||
if r_state == u'prereq':
|
||||
if r_state.startswith(u'prereq') and not r_state.startswith(u'prerequired'):
|
||||
run_dict = self.pre
|
||||
else:
|
||||
run_dict = running
|
||||
@ -2267,8 +2267,10 @@ class State(object):
|
||||
req_stats.add(u'change')
|
||||
continue
|
||||
if r_state.startswith(u'prereq') and run_dict[tag][u'result'] is None:
|
||||
if not r_state.startswith(u'prerequired'):
|
||||
req_stats.add(u'premet')
|
||||
if r_state.startswith(u'prereq') and not run_dict[tag][u'result'] is None:
|
||||
if not r_state.startswith(u'prerequired'):
|
||||
req_stats.add(u'pre')
|
||||
else:
|
||||
req_stats.add(u'met')
|
||||
@ -2459,7 +2461,6 @@ class State(object):
|
||||
self.pre[tag][u'changes'] = {u'watch': u'watch'}
|
||||
self.pre[tag][u'result'] = None
|
||||
else:
|
||||
log.error('==== low {} running {} chunks {} ===='.format(low, running, chunks))
|
||||
running = self.call_chunk(low, running, chunks)
|
||||
if self.check_failhard(chunk, running):
|
||||
running[u'__FAILHARD__'] = True
|
||||
|
@ -844,8 +844,6 @@ class StateModuleTest(ModuleCase, SaltReturnAssertsMixin):
|
||||
result = self.normalize_ret(ret)
|
||||
self.assertEqual(expected_result_simple, result)
|
||||
|
||||
log.error('=== ret {} ==='.format(ret))
|
||||
return
|
||||
# same test, but not using lists in yaml syntax
|
||||
# TODO: issue #8235, prereq ignored when not used in list syntax
|
||||
# Currently fails badly with :
|
||||
|
Loading…
Reference in New Issue
Block a user