[CentOS-devel] enhancing /etc/*-release

Howard Johnson merlin at mwob.org.uk
Tue Mar 31 20:45:22 UTC 2015


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 at c7dev2 ~]# rpm -q centos-release
centos-release-7-0.1406.el7.centos.2.5.x86_64
[root at 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 at c7dev ~]# rpm -q centos-release
centos-release-7-1.1503.el7.centos.2.7.x86_64
[root at 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 at c7dev2 ~]# ohai | fgrep platform
   "platform": "centos",
   "platform_version": "7.0.1406",
   "platform_family": "rhel",
       "platform": "x86_64-linux",

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


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

-- 
HJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos-devel/attachments/20150331/abee23f1/attachment.html>


More information about the CentOS-devel mailing list