Issue #20297 has been reported by Brandon Burton.

----------------------------------------
Bug #20297: Facter 1.7.0 on Amazon Linux tries to use 
Facter[:lsbdistrelease].value but 'lsb_release' is not included on Amazon Linux 
by default
https://projects.puppetlabs.com/issues/20297

* Author: Brandon Burton
* Status: Unreviewed
* Priority: Normal
* Assignee: 
* Category: cloud - ec2
* Target version: 
* Keywords: 
* Branch: 
* Affected Facter version: 1.7.0
----------------------------------------
When using Facter 1.7.0 on Amazon Linux ::operatingsystemrelease ends up with 
the kernel version in it

This is because operatingsystemrelease.rb is using 
Facter[:lsbdistrelease].value ( see 
https://github.com/puppetlabs/facter/blob/master/lib/facter/operatingsystemrelease.rb#L176
 ) which calls 'lsb_release' ( see 
https://github.com/puppetlabs/facter/blob/master/lib/facter/lsbdistrelease.rb#L15
 ) and that command is not present on Amazon Linux by default.

You can get lsb_release by installing the 'redhat-lsb-core' package

Unfortunately the package has a few dependencies, which everyone may not want 
to install

<pre>
Downloading Packages:
(1/22): binutils-2.22.52.0.1-10.36.amzn1.x86_64.rpm                             
                                                                                
                                                                                
                                                       | 5.2 MB     00:00
(2/22): gettext-0.18.1.1-9.1.9.amzn1.x86_64.rpm                                 
                                                                                
                                                                                
                                                       | 1.6 MB     00:00
(3/22): gettext-libs-0.18.1.1-9.1.9.amzn1.x86_64.rpm                            
                                                                                
                                                                                
                                                       | 422 kB     00:00
(4/22): libgomp-4.7.2-8.72.amzn1.x86_64.rpm                                     
                                                                                
                                                                                
                                                       | 116 kB     00:00
(5/22): libunistring-0.9.3-6.1.amzn1.x86_64.rpm                                 
                                                                                
                                                                                
                                                       | 419 kB     00:00
(6/22): m4-1.4.13-5.8.amzn1.x86_64.rpm                                          
                                                                                
                                                                                
                                                       | 286 kB     00:00
(7/22): mailx-12.4-6.6.amzn1.x86_64.rpm                                         
                                                                                
                                                                                
                                                       | 250 kB     00:00
(8/22): patch-2.6-6.6.amzn1.x86_64.rpm                                          
                                                                                
                                                                                
                                                       |  91 kB     00:00
(9/22): perl-5.10.1-130.18.amzn1.x86_64.rpm                                     
                                                                                
                                                                                
                                                       |  12 MB     00:00
(10/22): perl-CGI-3.51-130.18.amzn1.x86_64.rpm                                  
                                                                                
                                                                                
                                                       | 216 kB     00:00
(11/22): perl-Digest-SHA-5.47-130.18.amzn1.x86_64.rpm                           
                                                                                
                                                                                
                                                       |  68 kB     00:00
(12/22): perl-ExtUtils-MakeMaker-6.55-130.18.amzn1.x86_64.rpm                   
                                                                                
                                                                                
                                                       | 307 kB     00:00
(13/22): perl-ExtUtils-ParseXS-2.2003.0-130.18.amzn1.x86_64.rpm                 
                                                                                
                                                                                
                                                       |  46 kB     00:00
(14/22): perl-Module-Pluggable-3.90-130.18.amzn1.x86_64.rpm                     
                                                                                
                                                                                
                                                       |  40 kB     00:00
(15/22): perl-Pod-Escapes-1.04-130.18.amzn1.x86_64.rpm                          
                                                                                
                                                                                
                                                       |  33 kB     00:00
(16/22): perl-Pod-Simple-3.13-130.18.amzn1.x86_64.rpm                           
                                                                                
                                                                                
                                                       | 221 kB     00:00
(17/22): perl-Test-Harness-3.17-130.18.amzn1.x86_64.rpm                         
                                                                                
                                                                                
                                                       | 237 kB     00:00
(18/22): perl-Test-Simple-0.92-130.18.amzn1.x86_64.rpm                          
                                                                                
                                                                                
                                                       | 114 kB     00:00
(19/22): perl-devel-5.10.1-130.18.amzn1.x86_64.rpm                              
                                                                                
                                                                                
                                                       | 463 kB     00:00
(20/22): perl-libs-5.10.1-130.18.amzn1.x86_64.rpm                               
                                                                                
                                                                                
                                                       | 656 kB     00:00
(21/22): perl-version-0.77-130.18.amzn1.x86_64.rpm                              
                                                                                
                                                                                
                                                       |  51 kB     00:00
(22/22): redhat-lsb-core-4.0-7.9.amzn1.x86_64.rpm                               
                                                                                
                                                                                
                                                       |  26 kB     00:00
</pre>

I installed redhat-lsb-core and facter returns an operatingsystemrelease that 
matches what I'd expect

<pre>
[root@ec2-001 ~]# facter | grep operatingsystemrelease
operatingsystemrelease => 2013.03
</pre>

/etc/issue has all the info and may be suitable for parsing instead


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to