Machine not being detected as VM

Bug #1828217 reported by David Negreira on 2019-05-08
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Landscape Client
Undecided
Simon Poirier
landscape-client (Ubuntu)
Undecided
Unassigned
Xenial
Undecided
Unassigned
Bionic
Undecided
Unassigned
Disco
Undecided
Unassigned

Bug Description

[Impact]

 * Some KVM hypervisors are incorrectly detected by landscape-client,
   thus making it impossible to make use of VM license seats.

 * This upload extend the scanning to additional sys/class/dmi/id fields
   for known VM markers

[Test Case]

The issue can be reproduced on libvirt/kvm.

uvt-kvm create vm
virsh edit vm

<os>
...
<smbios mode='sysinfo'/>
</os>
...
<sysinfo type="smbios">
  <system>
    <entry name='manufacturer'>my fancy cloud</entry>
    <entry name='product'>my fancy KVM</entry>
  </system>
  <chassis>
    <entry name='manufacturer'>my fancy cloud</entry>
  </chassis>
</sysinfo>

virsh destroy vm && virsh start vm
uvt-kvm ssh vm --insecure
sudo landscape-config --log-level=debug -a devel --silent -t testclient
# will fail registering, but that's not relevant to the vm-type detection
grep vm-info /var/log/landscape/broker.log
# expected output is "KVM", and will be empty because of this bug

[Regression Potential]

 * The change is simple and scans an additional file for vm info.
   It's very similar to previous patches and is unlikely to regress.

 * Assuming this patch goes wrong, false positives may be detected as
   KVM. This would have minimal user impact VM can be used on full seats.

[Original description]
For a customer, he was unable to approve his VMs on Landscape hosted by Canonical.

Customer is running trusty which originally had installed:
ii landscape-client 14.12-0ubuntu6.14.04.4 i386 The Landscape administration system client
ii landscape-common 14.12-0ubuntu6.14.04.4 i386 The Landscape administration system client
We also tried to install from PPA ppa:landscape/17.03, upgraded the client and restarted it, but still no success on approving the machines.

Example of /proc/cpuinfo:

processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : QEMU Virtual CPU version (cpu64-rhel6)
stepping : 3
microcode : 0x1
cpu MHz : 2393.998
cache size : 4096 KB
physical id : 3
siblings : 1
core id : 0
cpu cores : 1
apicid : 3
initial apicid : 3
fdiv_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 4
wp : yes
flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm eagerfpu pni cx16 hypervisor lahf_lm
bogomips : 4787.99
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

SF case: 00225757
Let me know if you require further information.

Related branches

Simon Poirier (simpoir) on 2019-05-14
Changed in landscape-client:
status: New → Confirmed
status: Confirmed → In Progress
assignee: nobody → Simon Poirier (simpoir)
Simon Poirier (simpoir) on 2019-06-12
Changed in landscape-client:
status: In Progress → Fix Committed
Simon Poirier (simpoir) on 2019-06-17
description: updated
Changed in landscape-client (Ubuntu):
status: New → Fix Released

Hello David, or anyone else affected,

Accepted landscape-client into disco-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/landscape-client/18.01-0ubuntu7.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-disco to verification-done-disco. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-disco. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in landscape-client (Ubuntu Disco):
status: New → Fix Committed
tags: added: verification-needed verification-needed-disco
Brian Murray (brian-murray) wrote :

Hello David, or anyone else affected,

Accepted landscape-client into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/landscape-client/18.01-0ubuntu3.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in landscape-client (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed-bionic
Brian Murray (brian-murray) wrote :

Hello David, or anyone else affected,

Accepted landscape-client into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/landscape-client/16.03-0ubuntu2.16.04.7 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in landscape-client (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed-xenial
Simon Poirier (simpoir) wrote :

Verified bionic-proposed with the above instructions and it works as expected:

root@bi:/home/multipass# landscape-config --log-level=debug -a devel --silent -t testclient
[ ok ] Restarting landscape-client (via systemctl): landscape-client.service.

root@bi:/home/multipass# grep vm-info /var/log/landscape/broker.log
               'vm-info': b'kvm'}],

tags: added: verification-done-bionic
removed: verification-needed-bionic
Simon Poirier (simpoir) wrote :

verified disco-proposed, also as expected:

multipass@di:~$ sudo landscape-config --log-level=debug -a devel --silent -t testclient
[ ok ] Restarting landscape-client (via systemctl): landscape-client.service.
Please wait...
Traceback (most recent call last):
Failure: landscape.lib.amp.MethodCallError: timeout

multipass@di:~$ sudo grep vm-info /var/log/landscape/broker.log
               'vm-info': b''}],
               'vm-info': b'kvm'}],

Also successfully verified xenial-proposed:

multipass@xe:~$ sudo landscape-config --log-level=debug -a devel --silent -t testclient
[ ok ] Restarting landscape-client (via systemctl): landscape-client.service.
Please wait...
Invalid account name or registration key.
multipass@xe:~$ sudo grep vm-info /var/log/landscape/broker.log
               'vm-info': ''}],
               'vm-info': 'kvm'}],

tags: added: verification-done verification-done-disco verification-done-xenial
removed: verification-needed verification-needed-disco verification-needed-xenial

The verification of the Stable Release Update for landscape-client has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package landscape-client - 18.01-0ubuntu3.4

---------------
landscape-client (18.01-0ubuntu3.4) bionic; urgency=medium

  * d/p/product-name-vminfo-1828217.patch: Add product_name to things scanned
    for vm_info (LP: #1828217)
  * d/landscape-client.postinst: Set default value if data_path is
    missing. (LP: #1728681)
  * d/p/stagger-launch-1788518.patch: Add option to stagger launch of broker
    plugins. (LP: #1788518)
  * d/landscape-client.init: Fix init script stop action (LP: #1833137)

 -- Simon Poirier <email address hidden> Thu, 27 Jun 2019 11:07:30 -0400

Changed in landscape-client (Ubuntu Bionic):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package landscape-client - 18.01-0ubuntu7.1

---------------
landscape-client (18.01-0ubuntu7.1) disco; urgency=medium

  * d/p/product-name-vminfo-1828217.patch: Add product_name to things scanned
    for vm_info (LP: #1828217)
  * d/landscape-client.postinst: Set default value if data_path is
    missing. (LP: #1728681)
  * d/p/stagger-launch-1788518.patch: Add option to stagger launch of broker
    plugins. (LP: #1788518)
  * d/landscape-client.init: Fix init script stop action (LP: #1833137)

 -- Simon Poirier <email address hidden> Thu, 27 Jun 2019 11:07:30 -0400

Changed in landscape-client (Ubuntu Disco):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package landscape-client - 16.03-0ubuntu2.16.04.7

---------------
landscape-client (16.03-0ubuntu2.16.04.7) xenial; urgency=medium

  * d/p/product-name-vminfo-1828217.patch: Add product_name to things scanned
    for vm_info (LP: #1828217)
  * d/landscape-client.postinst: Set default value if data_path is
    missing. (LP: #1728681)
  * d/p/stagger-launch-1788518.patch: Add option to stagger launch of broker
    plugins. (LP: #1788518)
  * d/landscape-client.init: Fix init script stop action (LP: #1833137)

 -- Simon Poirier <email address hidden> Fri, 28 Jun 2019 12:18:32 -0400

Changed in landscape-client (Ubuntu Xenial):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers