Skip to content
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

Issue #6427 fix : Choose Package Provider on CentOS Boxes with Custom /etc/centos-release Content #6452

Merged
merged 1 commit into from
Jul 31, 2013

Conversation

tedops
Copy link

@tedops tedops commented Jul 30, 2013

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.

@tedops
Copy link
Author

tedops commented Jul 30, 2013

Another symptom of this problem:

# salt-call --local pkg.list_pkgs
Function pkg.list_pkgs is not available

…to address CentOS boxes that may have custom content within /etc/centos-release
thatch45 added a commit that referenced this pull request Jul 31, 2013
Issue #6427 fix : Choose Package Provider on CentOS Boxes with Custom /etc/centos-release Content
@thatch45 thatch45 merged commit fa8e3db into saltstack:develop Jul 31, 2013
@cvrebert
Copy link
Contributor

@thatch45 This broke Travis/pylint. Watch out for backslashes in regexes!

@tedops tedops deleted the issue-6427 branch July 31, 2013 16:00
@tedops
Copy link
Author

tedops commented Jul 31, 2013

Ah - needed raw string notation: 9b09697

Reason:
http://docs.python.org/2/library/re.html#raw-string-notation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants