Issue #6427 fix : Choose Package Provider on CentOS Boxes with Custom /etc/centos-release Content #6452
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added conditional block to grains/core.py to address CentOS boxes that may have custom content within /etc/centos-release.
I encountered this after I transferred my configs to a CentOS box from getting Salt to work locally with Vagrant. None of the "usual" packages would install through Salt, but I could install them through yum.
As it turned out, our company uses custom CentOS spins with one of the changes being custom text in /etc/centos-release. The custom text was being added as the osname grain. That custom text didn't have a mapping in _OS_NAME_MAP, which resulted in os_family not being defined properly...and so on. Basically, this threw off Salt's package provider logic, thus packages couldn't be installed on CentOS (potentially, and on a custom spin), despite being able to do so directly with yum.