Exceptions thrown when state is applied
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.
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 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
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