Jira (FACT-2985) Facter 4 outputs os.distro.description differently on Debian 9

12 views
Skip to first unread message

Gabriel Nagy (Jira)

unread,
Mar 16, 2021, 10:10:03 AM3/16/21
to puppe...@googlegroups.com
Luchian Nemes created an issue
 
Facter / Bug FACT-2985
Facter 4 outputs os.distro.description differently on Debian 9
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2021/03/16 7:09 AM
Priority: Normal Normal
Reporter: Luchian Nemes

Running puppet facts diff on macOS gives the following output:

      {
        "mountpoints./Volumes/puppet-agent-6.21.1.28.g8d35b8853-1.osx10.14.options.0": {
          "new_value": "read-only",
          "old_value": "readonly"
        }

There is an extra hyphen for readonly in the mountpoint options in Facter 4. This is probably the culprit in 3: https://github.com/puppetlabs/facter/blob/3.x/lib/src/facts/bsd/filesystem_resolver.cc#L55.

On the other hand, Facter 4, uses sys-filesystem: https://github.com/djberg96/sys-filesystem/blob/9880f127465e680534263ec0de078179d73ef18b/lib/sys/unix/sys/filesystem.rb#L16

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Gabriel Nagy (Jira)

unread,
Mar 16, 2021, 10:13:02 AM3/16/21
to puppe...@googlegroups.com
Gabriel Nagy updated an issue
Change By: Gabriel Nagy
Running *puppet facts diff* on macOS Debian 9 gives the following output:
{code:json}
      {
        " mountpoints os . /Volumes/puppet-agent-6 distro . 21.1.28.g8d35b8853-1.osx10.14.options.0 description ": {
          "new_value": "
read-only Debian GNU/Linux 9 (stretch) ",
          "old_value": "
readonly Debian GNU/Linux 9.0 (stretch) "
        }
{code}

There The minor version is an extra hyphen for {{readonly}} missing in the mountpoint options in Facter 4 . This is probably the culprit in 3: https://github.com/puppetlabs/facter/blob/3.x/lib/src/facts/bsd/filesystem_resolver.cc#L55.

Josh Cooper (Jira)

unread,
Apr 1, 2021, 1:25:02 PM4/1/21
to puppe...@googlegroups.com
Josh Cooper commented on Bug FACT-2985
 
Re: Facter 4 outputs os.distro.description differently on Debian 9

Facter 3 executes lsb_release -a, while Facter 4 parses /etc/os-release:

root@smooth-pear:~# lsb_release -d
Description:	Debian GNU/Linux 9.0 (stretch)
root@smooth-pear:~# grep PRETTY_NAME /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"

We should add a known limitation as this will affect puppet facts diff Claire Cadman

Claire Cadman (Jira)

unread,
Apr 16, 2021, 5:40:03 AM4/16/21
to puppe...@googlegroups.com
Claire Cadman updated an issue
 
Change By: Claire Cadman
Labels: doc_reviewed known-issue-added
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Ciprian Badescu (Jira)

unread,
Jun 9, 2021, 10:07:01 AM6/9/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Apr 21, 2022, 1:11:04 PM4/21/22
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Component/s: Facter 4
This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo

Josh Cooper (Jira)

unread,
Jan 9, 2023, 3:03:01 PM1/9/23
to puppe...@googlegroups.com
Josh Cooper commented on Bug FACT-2985
 
Re: Facter 4 outputs os.distro.description differently on Debian 9

We don't have plans on changing Facter 4, so I'm going to close this.

This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages