Jira (FACT-2984) CLONE - Facter 4 outputs mountpoints facts differently on macOS

5 views
Skip to first unread message

Gabriel Nagy (Jira)

unread,
Mar 16, 2021, 10:06:03 AM3/16/21
to puppe...@googlegroups.com
Luchian Nemes created an issue
 
Facter / Bug FACT-2984
CLONE - Facter 4 outputs mountpoints facts differently on macOS
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2021/03/16 7:05 AM
Priority: Normal Normal
Reporter: Luchian Nemes

Running puppet facts diff on Solaris 11 SPARC gives the following output:

        "hypervisors.ldom.role_control": {
          "new_value": "false",
          "old_value": false
        },
        "hypervisors.ldom.role_io": {
          "new_value": "false",
          "old_value": false
        },
        "hypervisors.ldom.role_root": {
          "new_value": "false",
          "old_value": false
        },
        "hypervisors.ldom.role_service": {
          "new_value": "false",
          "old_value": false
        },

This may be due to how Facter 3 represents boolean values in general, as ldom facts appear to be strings when placed in the collection: https://github.com/puppetlabs/facter/blob/3.x/lib/src/facts/solaris/ldom_resolver.cc#L55

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:09:02 AM3/16/21
to puppe...@googlegroups.com
Gabriel Nagy updated an issue
Change By: Gabriel Nagy
Running *puppet facts diff* on Solaris 11 SPARC macOS gives the following output:
{code:json}
        "hypervisors.ldom.role_control": {
          "
new_value": "false",
          "old_value": false
        },
        "hypervisors
mountpoints . ldom /Volumes/puppet-agent-6 . role_io": {

          "new_value": "false",
          "old_value": false
        },
        "hypervisors 21 . ldom 1 . role_root 28.g8d35b8853-1.osx10.14.options.0 ": {
          "new_value": "
false read-only ",
          "old_value":
false
        },
        " hypervisors.ldom.role_service readonly " : {
          "new_value": "false",
          "old_value": false
        } ,

{code}

This may be due to how Facter 3 represents boolean values There is an extra hyphen for {{readonly}} in general, as ldom facts appear to be strings when placed the mountpoint options in Facter 4. This is probably the collection culprit in 3 : https://github.com/puppetlabs/facter/blob/3.x/lib/src/facts/ solaris bsd / ldom_resolver 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
Reply all
Reply to author
Forward
0 new messages