[Bug 1170325] Re: Facter 1.6.X not considering Qemu/KVM virtual type
Launchpad Bug Tracker
1170325 at bugs.launchpad.net
Fri May 24 16:09:13 UTC 2013
This bug was fixed in the package facter - 1.7.0-1ubuntu1
---------------
facter (1.7.0-1ubuntu1) saucy; urgency=low
* Merge from Debian unstable (LP: #1173265). Remaining changes:
- debian/control: ruby-json is not in main, so move Depends to Suggests.
* Dropped changes:
- gem2deb and ruby-pkg-tools are now in main:
+ use what we had in natty; we don't want ruby-pkg-tools
in main. (LP: #408402)
+ Continue using ruby + libopenssl-ruby as Build-Depends even tho Debian
has moved to gem2deb (not in main).
- No longer necessary:
+ Use dh_prep instead of dh_clean, add build-arch + build-indep targets
- Debian packaging now supports multiple Ruby versions:
+ Make binary package depend on ruby1.8 explicitly
- Applied in Debian:
+ debian/patches/ubuntu_xen_print_virtual.patch: correctly detect
xen0,xenu. (LP: #980291)
* d/control: virt-what is not in main, so move Depends to Suggests.
* d/control, d/tests: add dep8 smoke test.
* d/p/kvm-cpuinfo: detect "Common KVM processor" in /proc/cpuinfo as virtual
(LP: #1170325).
facter (1.7.0-1) unstable; urgency=low
[ Micah Anderson ]
* fix xen0/xenu detection (Closes: #682417)
[ Stig Sandbeck Mathisen ]
* New upstream release
* Recommend virt-what for virtualization detection
* Update copyright information
facter (1.6.10-1) unstable; urgency=low
* New upstream release
* Remove upstream LSB patch included in this release
-- Robie Basak <robie.basak at canonical.com> Mon, 20 May 2013 14:09:11 +0000
** Changed in: facter (Ubuntu)
Status: Triaged => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1170325
Title:
Facter 1.6.X not considering Qemu/KVM virtual type
Status in “facter” package in Ubuntu:
Fix Released
Status in “facter” source package in Precise:
Triaged
Status in “facter” source package in Quantal:
Triaged
Status in “facter” source package in Raring:
Triaged
Bug description:
[Impact]
facter recognises a /proc/cpuinfo CPU model of "Common KVM processor"
as a physical machine. facter is most often used with puppet, and
causes puppet manifests to mis-classify virtual machines of this type
and apply incorrect rules where the puppet manifests supplied by
system administrators differ on this criterion.
[Stable and Development Fix]
A cherry-pick of the upstream fix, modified to be made minimal (one
line). See the quilt patch for details.
[Test Case 1]
Run "facter is_virtual". On a physical machine, this should say false.
On a virtual machine reporting in /proc/cpuinfo as "QEMU Virtual CPU"
as well as a virtual machine reporting in /proc/cpuinfo as "Common KVM
Processor", "facter is_virtual" should say true.
[Test Case 2]
As a shortcut, on Quantal and Raring you can fake the /proc/cpuinfo
file as follows:
mkdir -p /tmp/proc/{lower,upper,combined}
cd /tmp/proc
mount -t proc none lower
mount -t tmpfs -o mode=755 none upper
mount -t overlayfs -o lowerdir=lower,upperdir=upper none combined
stop rsyslogd
stop acpid
umount /proc && mount --bind combined /proc
Then you can edit /proc/cpuinfo and run facter to test behaviour as
per Test Case 1.
This is a hack and does not appear to work correctly in Precise.
[Regression Potential]
It looks like detection of other model strings in /proc/cpuinfo may
have regressed upstream, fixed by a later commit. It's important to
test that both model strings of "QEMU Virtual CPU" and "Common KVM
processor" detect as virtual, and that another string (eg. "Other")
detects as physical.
[Original Description]
On ubuntu 12.04 LTS, the official version for the facter package is
1.6.5-ubuntu1.
ii facter 1.6.5-1ubuntu1 collect and display facts about the system
The is_virtual? method is not recognized on last version of KVM,
because of the output of /proc/cpuinfo, which does not contains “Qemu
Server” Infos.
model name : Common KVM processor
The workaround was added in the next versions of facter, and so I
would like to provide you this patch, which fixes this bug on Ubuntu
12.04 LTS.
Best regards
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/facter/+bug/1170325/+subscriptions
More information about the Ubuntu-sponsors
mailing list