Open fattybenji opened 5 years ago
looks like i'm able to replicate this and seems you have a good grasp that the issue is m_kwargs
is None. if you want to push a PR should be an easy fix.
Looks fixed by https://github.com/saltstack/salt/commit/f0c0bd08b82e97401b39bb59395d880bda14676a which is only in develop branch.
Is this fixed in 2018.3.4 or 2019.2.2 ? I am seeing same problem in these versions...
ID: wait_for_lock
Function: loop.until
Name: vault.read_secret
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1933, in call
**cdata['kwargs'])
File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 1951, in wrapper
return f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/salt/states/loop.py", line 106, in until
m_ret = __salt__[name](*m_args, **m_kwargs)
TypeError: read_secret() argument after ** must be a mapping, not NoneType
Started: 13:36:16.123531
Duration: 1.78 ms
Changes:
cat loop.sls wait_for_lock: loop.until:
Right now, I see that the commit is only included in develop, neon and tornado50, so not fixed in those versions. Maybe the commit should be included in the 2018.3 and/or 2019.2 branches, but I don't know how that could be done (I'm not familiar with the process there)
Maybe our dear @Ch3LL could give us some information there.
Is there a workaround for this to make it work in the meantime? like declaring an empty mapping, or something like that?
anyone? no workaround?
Not 100% sure about the process here, but I will create two pull requests from and towards 2018.3 and 2019.2
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
Thank you for updating this issue. It is no longer marked as stale.
Description of Issue/Question
Setup
version v2018.3.2
Steps to Reproduce Issue
Run something like this :
And it should break, saying that kwargs cannot be NoneType. In that case, test.sleep only has one arg, "length". Same when we only give it as kwarg :
I think it's because the loop.until state doesn't test null args or kwargs. I think it has not been modified in later version. We could maybe test whether args or kwargs are null and adapt the call, or create a default value...
If no one has the time I can probably give it a shot (if someone agrees on an implementation)
Versions Report
Don't hesitate to ask for more details.