Bug #10271
Amazon Linux operatingsytem and operatingsystemrelease and osfamily facts do not work
| Status: | Closed | Start date: | 10/25/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 100% |
||
| Category: | library | |||
| Target version: | 1.6.5 | Estimated time: | 1.00 hour | |
| Keywords: | amazonlinux | Affected Facter version: | 1.6.4 | |
| Branch: | ||||
| Votes: | 0 |
Description
I am using the latest AMI (ami-7f418316) for Amazon Linux and it has no /etc/redhat-release
In the documentation (http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/index.html?LinuxAMIUserGuide.html)
it states that /etc/system-release should be used to determine current release:
Amazon linux AMIs contain a /etc/system-release file that specifies the current release that is installed. This file is updated through yum and is part of the system-release rpm.
Following is an example of /etc/system-release file:
# cat /etc/system-release
Amazon Linux AMI release 2011.09
An Amazon Linux AMI also contains a machine readable version of the /etc/system-release file found in /etc/system-release-cpe and follows the CPE specification from MITRE (CPE).
# cat /etc/system-release Amazon Linux AMI release 2011.09
It looks like release version is 2011.09, I am not sure how to map that to rhel5/rhel6
History
Updated by Dan Bode 7 months ago
- Status changed from Unreviewed to Accepted
- Assignee set to Dan Bode
Updated by Ken Barber 7 months ago
- Subject changed from CloudLinux operationsytem and operatingsystemversion and osfamily facts do not work to Amazon Linux operatingsytem and operatingsystemversion and osfamily facts do not work
I presume this is for Amazon Linux not CloudLinux?
Looks like the usage of lsb tools was not the correct path:
https://github.com/puppetlabs/facter/commit/9101e466a2119308db73c334f103a66157d9cf7b#diff-0
Its my fault – I should have known this. I presume when you get lsb tools on the box it works – but its another dependency.
Updated by Dan Bode 7 months ago
correct, this is amazon linux. lsb tools are not installed by default on Amazon Linux.
Updated by Nigel Kersten 7 months ago
- Keywords set to amazonlinux
Updated by Garrett Honeycutt 6 months ago
Reminder to update puppetlabs-ntp module when this is sorted out.
https://github.com/puppetlabs/puppetlabs-ntp/pull/4#issuecomment-2700043
Updated by Ken Barber 6 months ago
- Category set to library
- Target version set to 1.6.x
- Affected Facter version set to 1.6.3
Updated by Marcus Ferreira 5 months ago
- Status changed from Accepted to Needs Decision
- % Done changed from 0 to 100
- Estimated time set to 1.00
- Affected Facter version changed from 1.6.3 to 1.6.4
Hello,
On github I made a pull request with a fix for this issue:
https://github.com/puppetlabs/facter/pull/129
https://github.com/mv/facter/commit/4c10731575abd249d0914260f351225bc4cfadde
I tested it and is working fine in my instances of Amazon Linux 2011.09.
I hope it can be useful.
Marcus
Updated by Ken Barber 5 months ago
- Status changed from Needs Decision to In Topic Branch Pending Review
Updated by Ken Barber 5 months ago
Looks good on a cursory glance but worried about backwards compatibility to older version of Amazon Linux – comments in pull request. I closed the pull request as you should raise it against 1.6.x.
Updated by Ken Barber 5 months ago
- Subject changed from Amazon Linux operatingsytem and operatingsystemversion and osfamily facts do not work to Amazon Linux operatingsytem and operatingsystemrelease and osfamily facts do not work
- Assignee changed from Adrien Thebo to Marcus Ferreira
Hey marcus – the patch looks great. So the ticket also covers the operatingsystemrelease fact, which at the moment is using lsb. It would be awesome if you could solve that as well :–).
Updated by Daniel Pittman 4 months ago
- Status changed from In Topic Branch Pending Review to Merged - Pending Release
- Target version changed from 1.6.x to 1.6.5
Ken Barber wrote:
Hey marcus – the patch looks great. So the ticket also covers the operatingsystemrelease fact, which at the moment is using lsb. It would be awesome if you could solve that as well :–).
I merged the code, because while it would be great to get the extra change, it doesn’t seem necessary to delay this code waiting for a convenient but not directly blocking change.
Updated by Matthaus Litteken 4 months ago
- Status changed from Merged - Pending Release to Closed
Released in 1.6.5rc1