-
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
[BUG] pkg.installed state with pkgs argument but no version gives WARNING #64563
Comments
Same root cause as #64476 |
I believe changing https://github.com/saltstack/salt/blame/5d86ead778983fd87e074a2093abe002e244aab8/salt/modules/yumpkg.py#L1456-L1457 version = kwargs.get("version")
if version is not None:
kwargs["version"] = str(version) would fix the issue; a quick simple 2 line change. I will try to find time at some point to figure out how setup, test and contribute pull requests, but in the meantime it would be nice if someone with a saltstack contributor development environment already setup could make this change for the next release. |
FYI, still seeing this warning a lot in v3006.7
|
Description
For some of my
pkg.installed
states I get this warningI am not specifying a
'version'
argument though.My state looks like this:
See https://devops.stackexchange.com/questions/18023/in-salt-what-causes-the-warning-version-argument-will-be-ignored-for-multiple
The code in lines 1450-1451 in yumpkg.py (https://github.com/saltstack/salt/blame/0892d076846525e694f8aedb6217884ca75845f3/salt/modules/yumpkg.py#L1450-L1451) converts the version argument to a
str
, but it converts even if the version argument isNone
which then converts the version argument to the literal string'None'
. This code needs to check that the value is not None before converting to a string.Setup
Steps to Reproduce the behavior
Expected behavior
No warning is display when using
pkgs
and not specifying aversion
Screenshots
If applicable, add screenshots to help explain your problem.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: