Instances on Apache CloudStack using KVM hypervisor are not detected as virtual machines

Bug #1754073 reported by Alex Moldovan
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Landscape Client
Fix Committed
High
Simon Poirier
landscape-client (Ubuntu)
Fix Released
Medium
Simon Poirier
Trusty
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Artful
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

 * This issue affects users of Apache Cloudstack instances by failing to
   detect the hypervisor type and reporting the clients as running on
   a physical machine instead of on KVM.

 * This fix extends dmi vendor mapping, so that clouds customizing sys_vendor
   chassis_vendor or bios_vendor values (e.g. CloudStack, DigitalOcean)
   still get detected as KVM instances.

[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'>Apache Software Foundation</entry>
    <entry name='product'>CloudStack KVM Hypervisor</entry>
  </system>
</sysinfo>
<cpu match='exact'> <!-- defaults to qemu, which would me detected correctly -->
  <model fallback='allow'>core2duo</model>
  <vendor>Intel</vendor>
</cpu>

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]

 * Like the previous update, this change is local and only affects vm-type
   detection, which should be low-risk.

 * Since we extend the current detection to fields we were not previously
   looking at, one of the risks is to falsely detect clients as running
   on KVM. This is why we took care to verify opposite scenarios in
   addition to making sure the existing unit tests pass. Were such a
   regression to occur, it would have a low user impact, as being detected as
   VM you can use either physical or VM license, whereas the opposite
   (due to the bug fixed here) is not true.

[Other Info]

 * AWS and DigitalOcean instances have been fixed slightly differently in
   the previous SRU, but we wanted to avoid repeating this for every other
   cloud, thus extending the DMI field lookup instead of adding yet another
   mapping value.

[Original Description]

Instances running on a Apache CloudStack that is using KVM as a hypervisor are not detected as virtual machines by the landscape-client. They are using a Full license to register instead of a Virtual one.

Information from the client:
Ubuntu 14.04.5 LTS
---------------------------------------
landscape-client 14.12-0ubuntu6.14.04.2
---------------------------------------
# cat /sys/class/dmi/id/sys_vendor
Apache Software Foundation
---------------------------------------
lscpu:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 1
On-line CPU(s) list: 0
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 42
Stepping: 1
CPU MHz: 2299.998
BogoMIPS: 4599.99
Hypervisor vendor: KVM
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 4096K
NUMA node0 CPU(s): 0
---------------------------------------

summary: Instances on Apache CloudStack using KVM hypervisor are not detected as
- a virtual machine
+ virtual machines
Simon Poirier (simpoir)
Changed in landscape-client (Ubuntu):
status: New → Confirmed
Changed in landscape-client:
status: New → Triaged
assignee: nobody → Simon Poirier (simpoir)
importance: Undecided → High
Revision history for this message
Simon Poirier (simpoir) wrote :
Simon Poirier (simpoir)
Changed in landscape-client:
status: Triaged → Fix Committed
Simon Poirier (simpoir)
description: updated
Simon Poirier (simpoir)
description: updated
Revision history for this message
Simon Poirier (simpoir) wrote :
Revision history for this message
Simon Poirier (simpoir) wrote :
Revision history for this message
Simon Poirier (simpoir) wrote :
Revision history for this message
Simon Poirier (simpoir) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "bionic.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Eric Desrochers (slashd)
Changed in landscape-client (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Simon Poirier (simpoir)
importance: Undecided → Medium
Simon Poirier (simpoir)
description: updated
Revision history for this message
Eric Desrochers (slashd) wrote :

Sponsored for bionic.

Note: I know there is some preliminary work this area but as previously discussed between Simon and I... It would be great to think of implementing autopkgtest at some point for lds-client.

- Eric

Eric Desrochers (slashd)
Changed in landscape-client (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  * d/p/detect-cloudstack-kvm-1754073.patch: Detect CloudStack
    kvm hypervisor (LP: #1754073)

 -- Simon Poirier <email address hidden> Mon, 26 Mar 2018 20:21:49 +0000

Changed in landscape-client (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Eric Desrochers (slashd) wrote :

Sponsored for A/X/T

Please note this is the mandatory QA process proposed packages have to pass :
https://wiki.ubuntu.com/LandscapeUpdates

- Eric

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Alex, or anyone else affected,

Accepted landscape-client into artful-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/landscape-client/16.03-0ubuntu3.17.10.3 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-artful to verification-done-artful. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-artful. 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!

Changed in landscape-client (Ubuntu Artful):
status: New → Fix Committed
tags: added: verification-needed verification-needed-artful
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Alex, 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.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-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!

Changed in landscape-client (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed-xenial
Changed in landscape-client (Ubuntu Trusty):
status: New → Fix Committed
tags: added: verification-needed-trusty
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Alex, or anyone else affected,

Accepted landscape-client into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/landscape-client/14.12-0ubuntu6.14.04.3 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-trusty to verification-done-trusty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-trusty. 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!

Revision history for this message
Alex Moldovan (alexmoldovan) wrote :

I don't have access to a Apache Cloudstack instance to test the detection part. I"ve installed it on Trusty and Xenial yesterday. All works as expected.

Revision history for this message
Karify DevOps (karifydevops) wrote :

I have tested this new package on trusty and now works as intended.

tags: added: verification-done-trusty verification-done-xenial
removed: verification-needed-trusty verification-needed-xenial
Revision history for this message
Simon Poirier (simpoir) wrote :

I have the package from -proposed running on a few xenial containers, VMs and hardware to make sure it still works.

tags: added: verification-done-artful
removed: verification-needed-artful
tags: removed: verification-needed
Revision history for this message
Robie Basak (racb) wrote :

Thank you for the very thoughtful Regression Potential section. Please could you confirm that the opposite scenarios have been verified as written up there? Please also confirm the package versions tested.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

As per Robie's comment, could you also give us some more information regarding how the package has been tested, what test cases have been actually performed as part of the verification?

Revision history for this message
Alex Moldovan (alexmoldovan) wrote :

I've tested:
16.03-0ubuntu3.17.10.3
16.03-0ubuntu2.16.04.4
14.12-0ubuntu6.14.04.3
to ensure they're working properly.
I don't have access to a Apache Cloudstack instance to test that particular detection part but that was tested by Karify DevOps (karifydevops) on Trusty.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package landscape-client - 14.12-0ubuntu6.14.04.3

---------------
landscape-client (14.12-0ubuntu6.14.04.3) trusty; urgency=medium

  * d/p/detect-cloudstack-kvm-1754073.patch: Detect CloudStack
    kvm hypervisor (LP: #1754073)

 -- Simon Poirier <email address hidden> Mon, 26 Mar 2018 21:44:38 +0000

Changed in landscape-client (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

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.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  * d/p/detect-cloudstack-kvm-1754073.patch: Detect CloudStack
    kvm hypervisor (LP: #1754073)

 -- Simon Poirier <email address hidden> Mon, 26 Mar 2018 21:15:45 +0000

Changed in landscape-client (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package landscape-client - 16.03-0ubuntu3.17.10.3

---------------
landscape-client (16.03-0ubuntu3.17.10.3) artful; urgency=medium

  * d/p/detect-cloudstack-kvm-1754073.patch: Detect CloudStack
    kvm hypervisor (LP: #1754073)

 -- Simon Poirier <email address hidden> Mon, 26 Mar 2018 21:36:50 +0000

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.