Closed sticky-note closed 1 year ago
Thank you for the bug report. I will try to look into the problems this week.
I could not get this to run at all with the latest version of Salt because they removed the six
library, which we were using (https://github.com/saltstack/salt/commit/d9b50659b2be467f31d59245e70202fbabc83092). So I guess that means no more support for Python 2 going forward! Once I removed all the Python 2 compatibility code, SaltGenResource
is working fine for me with Salt 3005 (Phosphorus).
Could you try the version on this branch and let me know your results? https://github.com/amendlik/salt-gen-resource/tree/phosphorus
@sticky-note, Any update on this?
Strange, with phosphorus
version of the script, I get:
root@rundeck_host:~# python3 /var/lib/rundeck/libext/SaltGenResource.py -s "*" -a manufacturer,os_family,os,osmajorrelease,osrelease,virtual,saltversion,saltenv username="rundeck"
Traceback (most recent call last):
File "/var/lib/rundeck/libext/SaltGenResource.py", line 562, in <module>
print(ResourceGenerator().as_yaml())
File "/var/lib/rundeck/libext/SaltGenResource.py", line 246, in __init__
parser = SaltNodesCommandParser()
TypeError: __new__() missing 3 required positional arguments: 'name', 'bases', and 'attrs'
[ERROR ] An un-handled exception was caught by Salt's global exception handler:
TypeError: __new__() missing 3 required positional arguments: 'name', 'bases', and 'attrs'
Traceback (most recent call last):
File "/var/lib/rundeck/libext/SaltGenResource.py", line 562, in <module>
print(ResourceGenerator().as_yaml())
File "/var/lib/rundeck/libext/SaltGenResource.py", line 246, in __init__
parser = SaltNodesCommandParser()
TypeError: __new__() missing 3 required positional arguments: 'name', 'bases', and 'attrs'
@amendlik , are you able to reproduce ?
@amendlik ?
I'm sorry. My other obligations have not permitted me time to work on this. I hope to get to it in the next few weeks.
Same problem here with Salt 3005.1
I was able to reproduce this and have made some changes for compatibility with Phosphorus. Please try the latest version on the phosphorus
branch.
Thanks @amendlik, it work perfectly for me.
@amendlik Works like a charm with us too.
Let's do a release and we will be done.
Thanks
@amendlik Wonderful, I close this issue
Hi @amendlik, I am using
SaltGenResource.py
for years now. Everything was working fine but.. I just figured out that rundeck was not refreshing anymore with my minion list. I isolated 2 bugs that seems to be likely related withv3005
release but not 100% sure (maybe bugs arrived withv3004.x
).Bug 1:
Some potential modification in
saltstack/salt
gives rise to ignoreresource_generator_log_level_logfile
default value specified inReadme.md
of this plugin. I found a workaround by hardcodingresource_generator_log_level_logfile: "warning"
in my minion configBug 2:
I found a workaround by commenting problematic line https://github.com/amendlik/salt-gen-resource/blob/master/SaltGenResource.py#L265 and everything seems to work fine again.
Since I do not master developing with Salt Python API and I don't know how you want address this issues (keeping backward compatibility if something break with previous versions of Salt or making a deeper refactor for example), I prefer to open this issue to track these bugs rather than to open an incomplete Pull Request.