yumpkg.py group_info not returning information
I was using the following Salt snippet on CentOS 6.5
minimaldesktop:
module.run:
- name: pkg.group_install
- m_name: [
'Desktop',
'Desktop Platform',
'X Window System',
'Fonts'
]
And received a "No groups available in any repository" error. I Googled around and traced the failure to yumpkg.py and added the --plugins option to lines 1346 and 1370, did a saltutil.sync_modules and now it functions correctly (for me).
I noticed that elsewhere in this file the --plugins option is included, but not in the group_info() function. Should it be, or is my case an outlier?
I'm unsure of the answer to that question. @terminalmage, you know a lot more about yum than I, what are your thoughts on this?
@Darth8878 which Salt version are you running?
2014.1.7
Sent from my iPhone
On Aug 6, 2014, at 18:24, Erik Johnson [email protected] wrote:
@Darth8878 https://github.com/Darth8878 which Salt version are you running.
— Reply to this email directly or view it on GitHub https://github.com/saltstack/salt/issues/14789#issuecomment-51406072.
Do you have repositories served up from a plugin, such as RHN/Spacewalk?
Actually, in this private cloud, yes, the repos are managed by spacewalk.
Sent from my iPhone
On Aug 6, 2014, at 18:26, Erik Johnson [email protected] wrote:
Do you have repositories served up from a plugin, such as RHN/Spacewalk/
— Reply to this email directly or view it on GitHub https://github.com/saltstack/salt/issues/14789#issuecomment-51406270.
OK, then this probably is the case. I'll run a couple tests here and take care of this, thanks for the report.
Thanks for the quick response!
Sent from my iPhone
On Aug 6, 2014, at 18:29, Erik Johnson [email protected] wrote:
OK, then this probably is the case. I'll run a couple tests here and take care of this, thanks for the report.
— Reply to this email directly or view it on GitHub https://github.com/saltstack/salt/issues/14789#issuecomment-51406542.
No problem! Thanks for following up so quick :smile:
@Darth8878 I've backported my fix to 2014.1.7 so you can test it. Can you download this file and place it in salt://_modules and sync it like you did earlier, to test the fix?
Will do. It's a secure facility so I emailed the file (from home workstation) to my work address and will test it out first thing in the morning (US EDT).
Sent from my iPhone
On Aug 6, 2014, at 20:32, Erik Johnson [email protected] wrote:
@Darth8878 https://github.com/Darth8878 I've backported my fix to 2014.1.7 so you can test it. Can you download this file https://raw.githubusercontent.com/terminalmage/salt/test-issue14789-on-2014.1.7/salt/modules/yumpkg.py and place it in salt://_modules and sync it like you did earlier, to test the fix?
— Reply to this email directly or view it on GitHub https://github.com/saltstack/salt/issues/14789#issuecomment-51416356.
Sounds good. I'm fairly confident that this will resolve the issue, so I am going to submit the pull request. Basically, I moved the --plugins to the _repoquery() helper function to ensure that every call to repoquery uses it. I'm going to mark this fixed pending verification, and we can close it out if the fix works for you.
Unfortunately, this fails as well. Looking at the source in group_info() I see the construction of the repoquery command line but it doesn't include --plugins so the execution fails.
Sent from my iPhone
On Aug 6, 2014, at 20:47, Erik Johnson [email protected] wrote:
Sounds good. I'm fairly confident that this will resolve the issue, so I am going to submit the pull request. Basically, I moved the --plugins to the _repoquery() helper function to ensure that every call to repoquery uses it. I'm going to mark this fixed pending verification, and we can close it out if the fix works for you.
— Reply to this email directly or view it on GitHub https://github.com/saltstack/salt/issues/14789#issuecomment-51417329.
@Darth8878 Whoops... I went and put the --plugins argument into the _repoquery() helper function, and group_info() is the one function that doesn't use it. Good catch. I've updated the branch, the file I linked you to earlier should contain the new commit. Can you test again?
That did it. It works fine now. Thanks!
Sent from my iPhone
On Aug 7, 2014, at 11:56, Erik Johnson [email protected] wrote:
@Darth8878 https://github.com/Darth8878 Whoops... I went and put the --plugins argument into the _repoquery() helper function, and group_info() is the one function that doesn't use it. Good catch. I've updated the branch, the file I linked you to earlier should contain the new commit. Can you test again?
— Reply to this email directly or view it on GitHub https://github.com/saltstack/salt/issues/14789#issuecomment-51491788.
Awesome, thanks for testing!
Fix is merged!