Jira (FACT-3178) Facter `` ldom.domainrole.impl`` fails on Solaris 11, SPARC

0 views
Skip to first unread message

Michael Hashizume (Jira)

unread,
Jan 16, 2023, 12:11:01 PM1/16/23
to puppe...@googlegroups.com
Michael Hashizume updated an issue
 
Facter / Bug FACT-3178
Facter `` ldom.domainrole.impl`` fails on Solaris 11, SPARC
Change By: Michael Hashizume
Team: Phoenix
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo

Michael Hashizume (Jira)

unread,
Jan 16, 2023, 12:11:03 PM1/16/23
to puppe...@googlegroups.com
Michael Hashizume moved an issue
Change By: Michael Hashizume
Key: PUP FACT - 11715 3178
Project: Puppet Facter

Josh Cooper (Jira)

unread,
Jan 30, 2023, 11:31:03 AM1/30/23
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jan 30, 2023, 11:32:03 AM1/30/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
[puppet-team-phoenix-public|https://perforce.slack.com/archives/C049M3SC73M/p1673869007041499]
 
A
Swisscom customer [50697|https://puppetlabs.zendesk.com/agent/tickets/50697] claims that on their Solaris server facter is failing to return expected results.
12 replies
----


For example:
With Facter 4.2.5 (PE 2021.x), we face the following bug:
Accessing fact ldom is OK:
(0)MGMT(gDom)root@vdcf-mgmt-gd:~#  facter ldom        
\{
  domainchassis => "1249BDYDE1",
  domaincontrol => "oc-master-02-cd",
  domainname => "vdcf-mgmt-gd",
  domainrole => {
    control => "false",
    impl => "LDoms",
    io => "false",
    root => "false",
    service => "false"
  },
  domainuuid => "edad1f61-ec07-efd1-f7da-fda1a9f35547"
}


Accessing ldom.domainrole is also OK:


(0)MGMT(gDom)root@vdcf-mgmt-gd:~#  facter ldom.domainrole
\{
  control => "false",
  impl => "LDoms",
  io => "false",
  root => "false",
  service => "false"
}
 


However, Accessing subitems of ldom.control do not work:


(0)MGMT(gDom)root@vdcf-mgmt-gd:~# facter ldom.domainrole.impl

(0)MGMT(gDom)root@vdcf-mgmt-gd:~#


However, when running the same command in debug mode, we see the value was successfully resolved to LDoms:


(130)MGMT(gDom)root@vdcf-mgmt-gd:~# facter ldom.domainrole.impl --debug
[2023-01-11 18:38:00.437408 ] INFO Facter - executed with command line: ldom.domainrole.impl --debug
[2023-01-11 18:38:00.437982 ] DEBUG Facter - Facter version: 4.2.5
[2023-01-11 18:38:00.442361 ] DEBUG Facter::FactManager - Resolving facts sequentially
[2023-01-11 18:38:00.442909 ] DEBUG Facter::FactLoader - Loading all internal facts
[2023-01-11 18:38:00.443405 ] DEBUG Facter::FactLoader - Loading custom facts
[2023-01-11 18:38:00.447715 ] DEBUG Facter::FactLoader - Loading external facts
[2023-01-11 18:38:00.448624 ] DEBUG LegacyFacter::Util::DirectoryLoader - Fact file /opt/puppetlabs/facter/facts.d/application.txt was parsed but no key=>value data was returned
[2023-01-11 18:38:00.454139 ] DEBUG Facter::QueryParser - List of resolvable facts: [#<Facter::SearchedFact:0x029d4c08 @name="ldom_domainrole_impl", @fact_class=Facts::Solaris::Ldom, @user_query="ldom.domainrole.impl", @type=:legacy, @file=nil>]
[2023-01-11 18:38:00.454412 ] DEBUG Facts::Solaris::Ldom - Solving the ldom fact.
[2023-01-11 18:38:00.454613 ] DEBUG Facter::Core::Execution::Posix - Executing command: /usr/sbin/virtinfo  -a  -p
[2023-01-11 18:38:00.500065 ] DEBUG Facter::FactManager - fact "ldom_domainrole_impl" has resolved to: LDoms
[2023-01-11 18:38:00.500617 ] DEBUG Facter::LegacyFactFormatter - Formatting for single user query
[2023-01-11 18:38:00.500997 ] DEBUG Facter::LegacyFactFormatter - Remove quotes from value if it is a simple string

(0)MGMT(gDom)root@vdcf-mgmt-gd:~#


Facter version:


(0)MGMT(gDom)root@vdcf-mgmt-gd:~# facter --version
4.2.5


Solaris version/architecture as follows:


(0)MGMT(gDom)root@vdcf-mgmt-gd:~# facter os.release
facter \{
  full => "11.4",
  major => "11",
  minor => "4"
}
(0)MGMT(gDom)root@vdcf-mgmt-gd:~# facter hardwareisa           
sparc

Josh Cooper (Jira)

unread,
Jan 30, 2023, 11:34:02 AM1/30/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
[puppet-team-phoenix-public|https://perforce.slack.com/archives/C049M3SC73M/p1673869007041499]
 
A customer claims that on their Solaris server facter is failing to return expected results.
12 replies
----


For example:
With Facter 4.2.5 (PE 2021.x), we face the following bug:
Accessing fact ldom is OK:
{noformat}
(0)MGMT(gDom)root@vdcf-mgmt-gd:~#  facter ldom        
\ {
  domainchassis => "1249BDYDE1",
  domaincontrol => "oc-master-02-cd",
  domainname => "vdcf-mgmt-gd",
  domainrole => {
    control => "false",
    impl => "LDoms",
    io => "false",
    root => "false",
    service => "false"
  },
  domainuuid => "edad1f61-ec07-efd1-f7da-fda1a9f35547"
}
{noformat}

Accessing ldom.domainrole is also OK:

{noformat}
(0)MGMT(gDom)root@vdcf-mgmt-gd:~#  facter ldom.domainrole
\ {
  control => "false",
  impl => "LDoms",
  io => "false",
  root => "false",
  service => "false"
}
{noformat}  


However, Accessing subitems of ldom.control do not work:

{noformat}
(0)MGMT(gDom)root@vdcf-mgmt-gd:~# facter ldom.domainrole.impl

(0)MGMT(gDom)root@vdcf-mgmt-gd:~#
{noformat}

However, when running the same command in debug mode, we see the value was successfully resolved to LDoms:

{noformat}
(130)MGMT(gDom)root@vdcf-mgmt-gd:~# facter ldom.domainrole.impl --debug
[2023-01-11 18:38:00.437408 ] INFO Facter - executed with command line: ldom.domainrole.impl --debug
[2023-01-11 18:38:00.437982 ] DEBUG Facter - Facter version: 4.2.5
[2023-01-11 18:38:00.442361 ] DEBUG Facter::FactManager - Resolving facts sequentially
[2023-01-11 18:38:00.442909 ] DEBUG Facter::FactLoader - Loading all internal facts
[2023-01-11 18:38:00.443405 ] DEBUG Facter::FactLoader - Loading custom facts
[2023-01-11 18:38:00.447715 ] DEBUG Facter::FactLoader - Loading external facts
[2023-01-11 18:38:00.448624 ] DEBUG LegacyFacter::Util::DirectoryLoader - Fact file /opt/puppetlabs/facter/facts.d/application.txt was parsed but no key=>value data was returned
[2023-01-11 18:38:00.454139 ] DEBUG Facter::QueryParser - List of resolvable facts: [#<Facter::SearchedFact:0x029d4c08 @name="ldom_domainrole_impl", @fact_class=Facts::Solaris::Ldom, @user_query="ldom.domainrole.impl", @type=:legacy, @file=nil>]
[2023-01-11 18:38:00.454412 ] DEBUG Facts::Solaris::Ldom - Solving the ldom fact.
[2023-01-11 18:38:00.454613 ] DEBUG Facter::Core::Execution::Posix - Executing command: /usr/sbin/virtinfo  -a  -p
[2023-01-11 18:38:00.500065 ] DEBUG Facter::FactManager - fact "ldom_domainrole_impl" has resolved to: LDoms
[2023-01-11 18:38:00.500617 ] DEBUG Facter::LegacyFactFormatter - Formatting for single user query
[2023-01-11 18:38:00.500997 ] DEBUG Facter::LegacyFactFormatter - Remove quotes from value if it is a simple string

(0)MGMT(gDom)root@vdcf-mgmt-gd:~#
{noformat}

Facter version:

{noformat}
(0)MGMT(gDom)root@vdcf-mgmt-gd:~# facter --version
4.2.5
{noformat}

Solaris version/architecture as follows:

{noformat}
(0)MGMT(gDom)root@vdcf-mgmt-gd:~# facter os.release
facter \ {
  full => "11.4",
  major => "11",
  minor => "4"
}
(0)MGMT(gDom)root@vdcf-mgmt-gd:~# facter hardwareisa           
sparc

{noformat}

Tony Vu (Jira)

unread,
Jan 31, 2023, 4:56:03 PM1/31/23
to puppe...@googlegroups.com
Tony Vu updated an issue
Change By: Tony Vu
Labels: escalation jira_escalated needs-validation

Patrick Grant (Jira)

unread,
Feb 13, 2023, 1:04:03 PM2/13/23
to puppe...@googlegroups.com
Patrick Grant commented on Bug FACT-3178
 
Re: Facter `` ldom.domainrole.impl`` fails on Solaris 11, SPARC

Question from todays Phoenix/support call, did this work in Facter 3? Facter debug output from both working and failure would be useful as well

Josh Cooper (Jira)

unread,
Feb 14, 2023, 4:45:04 PM2/14/23
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Mar 21, 2023, 10:20:02 PM3/21/23
to puppe...@googlegroups.com
Josh Cooper commented on Bug FACT-3178
 
Re: Facter `` ldom.domainrole.impl`` fails on Solaris 11, SPARC

I verified that facter 4 resolves the value, but filters out the resolved value because of confusion with dots in the user query.

Josh Cooper (Jira)

unread,
Mar 21, 2023, 10:20:02 PM3/21/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Labels: escalation jira_escalated needs-validation regression

Josh Cooper (Jira)

unread,
Mar 21, 2023, 10:20:02 PM3/21/23
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Apr 20, 2023, 12:34:01 PM4/20/23
to puppe...@googlegroups.com
Josh Cooper commented on Bug FACT-3178
 
Re: Facter `` ldom.domainrole.impl`` fails on Solaris 11, SPARC

I was able to reproduce the issue by copying the outout of virtinfo and creating fake ldom resovler/facter for linux: 

 

❯ bx facter ldom                   
{
  domainchassis => "AK00214287",
  domaincontrol => "pix-sun1",
  domainname => "pix-sol11-1",
  domainrole => {
    control => "false",
    impl => "LDoms",
    io => "false",
    root => "false",
    service => "false"
  },
  domainuuid => "4b38964c-4f69-4371-8166-be299677bd04"
}
 
❯ bx facter ldom.domainrole        
{
  control => "false",
  impl => "LDoms",
  io => "false",
  root => "false",
  service => "false"
}
❯ bx facter ldom.domainrole.control
 
 

If I comment out the legacy fact aliases from: Facts::Linux::Ldom::ALIASES then it works correctly:

❯ bx facter ldom.domainrole.control
false

I think the problem occurs because the legacy fact blockdevice_sda_vendor doesn't start with disks so we can dig into the disks fact correctly:

❯ bx facter disks.sda.vendor 
WD

Josh Cooper (Jira)

unread,
Apr 20, 2023, 12:46:02 PM4/20/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Labels: escalation jira_escalated needs-validation regression

Josh Cooper (Jira)

unread,
May 10, 2023, 12:54:03 PM5/10/23
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
May 18, 2023, 3:44:03 PM5/18/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Sprint: Phoenix 2023-06-07
This message was sent by Atlassian Jira (v8.20.21#820021-sha1:38274c8)
Atlassian logo

Aria Li (Jira)

unread,
May 18, 2023, 6:05:01 PM5/18/23
to puppe...@googlegroups.com

Aria Li (Jira)

unread,
May 19, 2023, 12:03:02 PM5/19/23
to puppe...@googlegroups.com
Aria Li updated an issue
Change By: Aria Li
Sprint: Phoenix 2023- 06 05 - 07 24

Michael Hashizume (Jira)

unread,
May 24, 2023, 1:08:03 PM5/24/23
to puppe...@googlegroups.com
Michael Hashizume updated an issue
Change By: Michael Hashizume
Sprint: Phoenix 2023-05-24 , Phoenix 2023-06-07

Aria Li (Jira)

unread,
Jun 13, 2023, 2:57:01 PM6/13/23
to puppe...@googlegroups.com
Aria Li updated an issue
Change By: Aria Li
Release Notes: Not Needed

Aria Li (Jira)

unread,
Jun 13, 2023, 8:40:02 PM6/13/23
to puppe...@googlegroups.com
Aria Li updated an issue
Change By: Aria Li
Release Notes: Not Needed Bug Fix

Aria Li (Jira)

unread,
Jun 13, 2023, 8:43:02 PM6/13/23
to puppe...@googlegroups.com
Aria Li updated an issue
Change By: Aria Li
Release Notes Summary: Previously, when searching for a fact that matches the user query, regex meta characters were not escaped like dots (.) which resulted in fact names incorrectly matching the user query and would result in the wrong fact being resolved.

Aria Li (Jira)

unread,
Jun 13, 2023, 8:54:02 PM6/13/23
to puppe...@googlegroups.com
Aria Li updated an issue
Change By: Aria Li
Release Notes Summary: Previously Now , when searching Facter searches for a fact that matches the user query, regex meta characters were not escaped metacharacters, like dots (.) , are escaped. Previously, metacharacters were not escaped which resulted in the regex that compares fact names incorrectly matching to the user query to resolve and would result in return the wrong fact being resolved .

Parker Leach (Jira)

unread,
Jun 14, 2023, 1:09:02 PM6/14/23
to puppe...@googlegroups.com
Parker Leach updated an issue
Change By: Parker Leach
Labels: docs_reviewed escalation jira_escalated regression
Reply all
Reply to author
Forward
0 new messages