Jira (FACT-866) pe-facter missing dependency on package providing lsb_release command

8 views
Skip to first unread message

Geoff Williams (JIRA)

unread,
Mar 24, 2015, 7:45:29 PM3/24/15
to puppe...@googlegroups.com
Geoff Williams updated an issue
 
Facter / Bug FACT-866
pe-facter missing dependency on package providing lsb_release command
Change By: Geoff Williams
Environment: *Debian*
{noformat}
geoff@jenkins:~$ lsb_release  -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.0 (jessie)
Release: 8.0
Codename: jessie
geoff@jenkins:~$ puppet --version
3.7.4 (Puppet Enterprise 3.7.2)
{noformat}

*CentOS*
{noformat}
[root@master tmp]# lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.5 (Final)
Release: 6.5
Codename: Final
[root@master tmp]# /opt/puppet/bin/puppet --version
3.7.4 (Puppet Enterprise 3.8.0-rc0-281-gd05d353)

{noformat}
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.3.10#6340-sha1:7ea293a)
Atlassian logo

Geoff Williams (JIRA)

unread,
Mar 24, 2015, 7:45:37 PM3/24/15
to puppe...@googlegroups.com
Geoff Williams created an issue
Issue Type: Bug Bug
Affects Versions: FACT 2.3.0
Assignee: Eric Sorenson
Created: 2015/03/24 4:44 PM
Environment:

Debian

geoff@jenkins:~$ lsb_release  -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 8.0 (jessie)
Release:	8.0
Codename:	jessie
geoff@jenkins:~$ puppet --version
3.7.4 (Puppet Enterprise 3.7.2)

CentOS


[root@master tmp]# lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.5 (Final)
Release: 6.5
Codename: Final
[root@master tmp]# /opt/puppet/bin/puppet --version
3.7.4 (Puppet Enterprise 3.8.0-rc0-281-gd05d353)

Priority: Normal Normal
Reporter: Geoff Williams

Overview

Factor fact lsbdistcodename does not work out of the box on minimal OS installs due to the pe-facter package not specifying a dependency on the package providing the lsb_release command.

Affected platforms:

  • Debian (tested 8.0/Jessie – after a forced install of PE agent)
  • Centos (tested 6.5 - trainingvm)
  • Probably more

Expected result

/opt/puppet/bin/facter lsbdistcodename

Should always print the LSB release code name

Actual result

Command output is dependent on supplementary packages being installed. On a minimal OS installation a blank line is printed:

[root@master tmp]# /opt/puppet/bin/facter lsbdistcodename

Packaging info

CentOS

[root@master tmp]# rpm -q --requires pe-facter
/opt/puppet/bin/ruby  
dmidecode  
pciutils  
pe-ruby  
pe-virt-what  
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(VersionedDependencies) <= 3.0.3-1
which  
rpmlib(PayloadIsXz) <= 5.2-1

Debian

geoff@jenkins:~$ dpkg -s pe-facter
Package: pe-facter
Status: install ok installed
Priority: optional
Section: ruby
Installed-Size: 388
Maintainer: Puppet Labs <in...@puppetlabs.com>
Architecture: amd64
Version: 2.3.0.2-1puppet1
Depends: pe-ruby, dmidecode, pe-virt-what, pciutils
Description: Ruby module for collecting simple facts about a host operating system
 Some of the facts are preconfigured, such as the hostname and the operating
 system. Additional facts can be added through simple Ruby scripts.
Homepage: http://www.puppetlabs.com

Problems this causes

Modules that expect to have the $::lsbdistcodename fact available fail in production in mysterious ways and facter itself gives no information or warning on how to resolve things. I was only able to figure out what was broken by looking at the source code.

I personally witnessed puppetlabs/java failing on Debian with a message that the operating system is not supported. This was resolved by installing the required package.

Condition diagnosis

To confirm you are affected by this issue, run the command:

/opt/puppet/bin/facter lsbdistcodename

If you do not see any output, you are missing the lsb_release program

Workaround

Debian

apt-get install lsb_release

CentOS/RHEL

yum install redhat-lsb-core

After installing these packages, the fact will work although on CentOS 6.5 it just displays the word Final which is all that is available via the lsb_release command.

Geoff Williams (JIRA)

unread,
Mar 24, 2015, 7:47:04 PM3/24/15
to puppe...@googlegroups.com

Geoff Williams (JIRA)

unread,
Mar 24, 2015, 10:09:02 PM3/24/15
to puppe...@googlegroups.com
Geoff Williams updated an issue
 
Change By: Geoff Williams
h2.  Overview

Factor fact {{lsbdistcodename}} does not work out of the box on minimal OS installs due to the {{pe-facter}} package not specifying a dependency on the package providing the {{lsb_release}} command.

Affected platforms:
* Debian (tested 8.0/Jessie -- after a forced install of PE agent)
* Centos (tested 6.5 -
 trainingvm  seteam )
* _Probably more_

h2.  Expected result
{noformat}
/opt/puppet/bin/facter lsbdistcodename
{noformat}

Should always print the LSB release code name

h2.  Actual result

Command output is dependent on supplementary packages being installed.  On a minimal OS installation a blank line is printed:
{noformat}

[root@master tmp]# /opt/puppet/bin/facter lsbdistcodename

{noformat}

h2.  Packaging info
*CentOS*
{noformat}

[root@master tmp]# rpm -q --requires pe-facter
/opt/puppet/bin/ruby  
dmidecode  
pciutils  
pe-ruby  
pe-virt-what  
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(VersionedDependencies) <= 3.0.3-1
which  
rpmlib(PayloadIsXz) <= 5.2-1
{noformat}

*Debian*
{noformat}

geoff@jenkins:~$ dpkg -s pe-facter
Package: pe-facter
Status: install ok installed
Priority: optional
Section: ruby
Installed-Size: 388
Maintainer: Puppet Labs <in...@puppetlabs.com>
Architecture: amd64
Version: 2.3.0.2-1puppet1
Depends: pe-ruby, dmidecode, pe-virt-what, pciutils
Description: Ruby module for collecting simple facts about a host operating system
 Some of the facts are preconfigured, such as the hostname and the operating
 system. Additional facts can be added through simple Ruby scripts.
Homepage: http://www.puppetlabs.com
{noformat}

h2.  Problems this causes

Modules that expect to have the {{$::lsbdistcodename}} fact available fail in production in mysterious ways and {{facter}} itself gives no information or warning on how to resolve things.  I was only able to figure out what was broken by looking at the source code.

I personally witnessed {{puppetlabs/java}} failing on Debian with a message that the operating system is not supported.  This was resolved by installing the required package.

h2.  Condition diagnosis

To confirm you are affected by this issue, run the command:
{noformat}
/opt/puppet/bin/facter lsbdistcodename
{noformat}

If you do not see any output, you are missing the {{lsb_release}} program

h2.  Workaround
*Debian*
{noformat}
apt-get install lsb_release
{noformat}

*CentOS/RHEL*
{noformat}
yum install redhat-lsb-core
{noformat}


After installing these packages, the fact will work although on CentOS 6.5 it just displays the word {{Final}} which is all that is available via the {{lsb_release}} command.

Daniel Parks (JIRA)

unread,
Apr 24, 2016, 7:10:10 PM4/24/16
to puppe...@googlegroups.com
Daniel Parks commented on Bug FACT-866
 
Re: pe-facter missing dependency on package providing lsb_release command

At least on Debian jessie, it should be apt-get install lsb-release (hyphen instead of underscore).

This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9)
Atlassian logo

Garrett Guillotte (Jira)

unread,
Jan 8, 2021, 6:35:03 PM1/8/21
to puppe...@googlegroups.com
Garrett Guillotte updated an issue
 
Change By: Garrett Guillotte
Comment: Hello from 2021. This broke PowerTrain in ZD P2 #42632. The requirement is not in the product docs, only in the module docs. Filing a docs ticket to rectify.
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Garrett Guillotte (Jira)

unread,
Jan 8, 2021, 6:35:04 PM1/8/21
to puppe...@googlegroups.com

Hello from 2021. This broke PowerTrain in ZD P2 #42632. The requirement is not in the product docs, only in the module docs. Filing a docs ticket to rectify.

Add Comment Add Comment
 
Reply all
Reply to author
Forward
0 new messages