[FACT-628] facter returns incorrect value for `facter virtual` for Solaris Ldoms Created: 2014/07/23  Updated: 2015/05/20  Resolved: 2015/05/20

Status: Closed
Project: Facter
Component/s: PE
Affects Version/s: FACT 1.7.5, FACT 2.3.0
Fix Version/s: FACT 2.4.4

Type: Bug Priority: Normal
Reporter: Jay Wallace Assignee: Unassigned
Resolution: Done Votes: 0
Labels: customer
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Story Points: 2
Sprint: Client 2015-05-27
Release Notes: Bug Fix
QA Contact: Eric Thompson


Whenever you execute facter with no arguments it loads both ldom.rb and virtual.rb, and virtual fact value is set properly. However, in the scenario where you execute facter virtual it loads only virtual.rb and given this fact is not explicitly set for Ldoms it defaults to setting the value as physical.

Below is an excerpt from ldom.rb where the virtual fact is added for Solaris:

    Facter.add("virtual") do
      confine :ldom_domainrole_control => 'false'
      has_weight 10
      setcode do

Comment by Eric Sorenson [ 2015/05/06 ]

Kylo Ginsberg this came up again as a customer escalation, could you pull it in for an upcoming sprint to have someone investigate?

Comment by Kylo Ginsberg [ 2015/05/18 ]

Tried on a solaris 10 ldom:

With facter 2.4.3:

$ /opt/csw/bin/ruby -I `pwd`/lib bin/facter virtual

With facter 2.4.4:

$ /opt/csw/bin/ruby -I `pwd`/lib bin/facter virtual

Generated at Sat Feb 22 15:13:23 PST 2020 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.