Issue #1558 has been reported by lludwig.
----------------------------------------
Bug #1558: factor 1.5.1 virtual fact not correct for a xen dom0
http://reductivelabs.com/redmine/issues/show/1558
Author: lludwig
Status: Unreviewed
Priority: Normal
Assigned to:
Category:
Target version:
Complexity: Unknown
Affected version: 0.25.0
Keywords:
on a centos 5.2 x86_64 dom0 it retruns xenu
<pre>
# facter virtual
xenu
</pre>
Here is a patch to fix the issue.
<pre>
--- facter-1.5.1/lib/facter/virtual.rb 2008-08-18 20:41:29.000000000 -0400
+++ facter-1.5.1.new/lib/facter/virtual.rb 2008-09-04 10:56:08.000000000
-0400
@@ -11,12 +11,14 @@
result = "openvz"
end
- if FileTest.exists?("/proc/sys/xen/independent_wallclock")
- result = "xenu"
- elsif FileTest.exists?("/proc/xen/capabilities")
- txt = File.read("/proc/xen/capabilities")
- if txt =~ /control_d/i
- result = "xen0"
+ # test if a xen domU
+ # half assed logic but it works
+ if FileTest.exists?("/proc/xen/capabilities")
+ xentest = %x{cat /proc/xen/capabilities}
+ if xentest =~ /control_d/i
+ result = "xen0"
+ else
+ result = "xenu"
end
end
</pre>
After patch, both domu and a dom0 return correct results
dom0 test:
<pre>
# facter virtual
xen0
</pre>
domu test:
<pre>
# facter virtual
xenu
</pre>
----------------------------------------
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://reductivelabs.com/redmine/my/account
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---