On 31/03/2015 21:27, Howard Johnson wrote:
live quotes from #centos:
<MerlinTHP> duritong: what is facter identifying 7.1 as?
<duritong> MerlinTHP: RedHat
<duritong> but it isn't able to figure out the release version

Yeah, looking at the facter sources, there's this bit of code:

https://github.com/puppetlabs/facter/blob/master/lib/src/facts/linux/operating_system_resolver.cc#L126

It's only looking at /etc/redhat-release, and it's looking for various strings in that file to work out what OS it is.  As the C7.1 redhat-release says "Red Hat" in it, it's identifying the OS as Red Hat.

I'm going to poke 7.1 with a few more tools and see what they say.

It also broke Ansible:

[root@c7dev2 ~]# rpm -q centos-release
centos-release-7-0.1406.el7.centos.2.5.x86_64
[root@c7dev2 ~]# ansible 127.0.0.1 -m setup -a filter=ansible_distribution
127.0.0.1 | success >> {
    "ansible_facts": {
        "ansible_distribution": "CentOS"
    },
    "changed": false
}

[root@c7dev ~]# rpm -q centos-release
centos-release-7-1.1503.el7.centos.2.7.x86_64
[root@c7dev ~]# ansible 127.0.0.1 -m setup -a filter=ansible_distribution
127.0.0.1 | success >> {
    "ansible_facts": {
        "ansible_distribution": "RedHat"
    },
    "changed": false
}


And it's broken ohai, so Chef is broken:

[root@c7dev2 ~]# ohai | fgrep platform
  "platform": "centos",
  "platform_version": "7.0.1406",
  "platform_family": "rhel",
      "platform": "x86_64-linux",

[root@c7dev ~]# ohai | fgrep platform
  "platform": "derived",
  "platform_version": null,
      "platform": "x86_64-linux",


So, does anyone know what this centos-release change fixes?

--
HJ