-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3000.1 - Converting module.run mine.send to new module format #56584
Comments
Just wanted to verify it works on 2019.2.3 as expected:
Versions report:
|
After more testing I got my module with mind.send working by adding a default value in my custom execution module. This now leads be to believe there is a bug with passing arguments (non-key word) into the mine.send function. Here's an example: Showing module works from commandline:
Example state:
Error in minion log:
Trying to pass in via keyword arg also fails:
Note this is with the following set in minion config:
|
@tazaki Thanks for all the detail. |
@tazaki Thanks for the report. The example of sending along the file path as a keyword argument is failing because in the |
That's #56496 |
As the person who introduced piping mine functions through utils.functools, I'll put in my $.02 @tazaki: I expect that this (slight modification of your 2nd attempt) should work:
The thing is that mine.send does not have a
The m_name argument is one of the reasons for the new module.run-format to exist. This is needed if you want to pass a @garethgreenaway I'm not entirely in agreement with the change you introduced in #56635 as this deviates from the format used in As for the example
The kwarg And lastly the example
This is a bit of an oddity, as the |
@github-abcde I'll try this shortly and post the results. Thank you! |
Tried it. Different error. Note I did put this in my minion config:
Here is the command I ran:
Here is the state:
Here is the module:
Here is from the minion debug log:
Edit adding versions:
|
I realized I changed my
Note changing the kwarg to arg also works with your suggestion:
|
Thank you so much @github-abcde ! |
In Salt '3000.2' we can't provide kwargs for mine call, so we need to use potitional arguments in pillar and for `module.run` with `mine.send` we need to use potitional arguments to provide the mine name, as `func` get renamed to `name` but this arguments is gave to the function behind, which make the mine function call fail. Sees saltstack/salt#56584
In Salt '3000.2' we can't provide kwargs for mine call, so we need to use potitional arguments in pillar and for `module.run` with `mine.send` we need to use potitional arguments to provide the mine name, as `func` get renamed to `name` but this arguments is gave to the function behind, which make the mine function call fail. Sees saltstack/salt#56584
Add compatibility for new `module.run` call style Add compatibility with Salt >= 3000 where mine functions changed a lot saltstack/salt@da29e15#diff-a64f3cb030f6172ac00301df45b9a678e36cbb2cac6d16c62e31cd8adfb1334cL187-R204 saltstack/salt#56584 (comment)
Description of Issue
I am unable to fix the syntax for a module.run state that is running a mine.send function.
Setup
Trying to run the following (legacy?) module.run in a state:
Returns the following error:
Note: this works pre version 3000 as shown in first comment.
Steps to Reproduce Issue
According to the docs for module.run here: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html
Changing to the following should work?
But I get the following:
I can't seem to change the error no matter how I swap around the parameters. Please help, I am not sure what I am doing wrong?
Versions Report
The text was updated successfully, but these errors were encountered: