saltstack/salt — pull request #6452 by tsheibar (2013-07-30 19:09:06+00:00)
Title: Issue #6427 fix : Choose Package Provider on CentOS Boxes with Custom /etc/centos-release Content

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.