salt icon indicating copy to clipboard operation
salt copied to clipboard

Exceptions thrown when state is applied

Open nulfox opened this issue 9 years ago • 3 comments

https://github.com/saltstack/salt/blob/2b9a4cf4c6ae31a1578d2e3e7ae04243e57f9864/salt/state.py#L1937

This line assumes runas/runas_password are in the state_con, but in a lot of cases, they are not. This leads to KeyError exceptions in state.apply runs.

This has started with recent release. Should there be a try/except block around this. Seems like its just clearing those entries from state_con.

nulfox avatar Nov 13 '17 18:11 nulfox

Actually, what are you running? because this should always be set, even if it is just set to None.

https://github.com/saltstack/salt/blob/2017.7/salt/state.py#L1762-L1767

since it is always set to None, even in else then it should always just pop that none value from the top of call()

Can you provide an example where this wouldn't be the case?

gtmanfred avatar Nov 13 '17 19:11 gtmanfred

@gtmanfred Yeah, I am not entirely sure how it winds up as missing. Will run trace/profiler to see exactly how that gets modified. Assumed it's being updated somewhere along the way. I believe this is a duplicate of https://github.com/saltstack/salt/issues/44136

nulfox avatar Nov 16 '17 18:11 nulfox

yeah it is a duplicate of that, but without us being able to reproduce it, there isn't a lot that we can do.

I am going to close this as a duplicate of #44136.

Thanks, Daniel

gtmanfred avatar Nov 16 '17 22:11 gtmanfred