Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1897130

Summary: Add vhostmd dependency on relevant virtualization provider properly to prevent Virtualization Vendor value error
Product: Red Hat Enterprise Linux 8 Reporter: koconnor
Component: vhostmdAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: YongkuiGuo <yoguo>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: ahadas, dougsland, fdanapfe, henning.sackewitz, lsurette, mhicks, michael.trapp, michal.skrivanek, mperina, mtessun, ngu, rjones, sfroemer, srevivo, virt-maint, ycui, yoguo
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: 8.4Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: vhostmd-1.1-5.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-18 15:06:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description koconnor 2020-11-12 11:57:26 UTC
Description of problem:
RHEL 8.2/RHV 4.4
This occurs in a RHV environment, I have not checked it on rhel with kvm.

The metrics return an error for the Virtualization Vendor value:
package libvirt is not installed.

Version-Release number of selected component (if applicable):
1.1

How reproducible:
So far always, I have verified on two different rhv hosts.

Steps to Reproduce:
1. execute this on the commandline:
# rpm -q --queryformat "%{VENDOR}\n" libvirt | sort -u

Actual results:
package libvirt is not installed

Expected results:
Red Hat, Inc.

Additional info:

I have a fix which works:
rpm -qa --queryformat "%{VENDOR}\n" libvirt* | sort -u

Comment 2 Steffen Froemer 2020-11-12 15:25:49 UTC
Hi Karen, are you experience this issue in a Red Hat Enterprise Linux Host (RHEL + rhv-packages) or on the Red Hat Virtualization Host (RHVH)?

Checking this on RHVH-4.4 (RHVH-4.4-20200930.0-RHVH-x86_64-dvd1.iso) the request working fine for me.


# rpm -q --queryformat "%{VENDOR}\n" libvirt 
Red Hat, Inc.

Could you please provide more information on your correct host-setup.
Thanks

Comment 3 koconnor 2020-11-12 15:38:33 UTC
I'm using Rhel Hosts (RHEL + rhv-packages)

Comment 4 Frank Danapfel 2020-11-13 09:52:15 UTC
Hi Karen,

according to the Package Browser on the Customer Portal there should be a 'libvirt' package for RHEL8:
https://access.redhat.com/downloads/content/libvirt/6.0.0-28.module+el8.3.0+7827+5e65edd7/x86_64/fd431d51/package

Therefore I'm a bit surprised that rpm claims that there is no libvirt package installed.

To get a better idea whats going on can you provide thev output of the following command from your RHEL host:
# rpm -qa libvirt

Comment 5 koconnor 2020-11-13 11:05:38 UTC
The output for that exact command is nothing and as you can see the output for the other:
[root@proton10 ~]# rpm -qa libvirt
[root@proton10 ~]# rpm -qa libvirt*
libvirt-daemon-driver-storage-iscsi-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-daemon-driver-network-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-client-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-daemon-driver-qemu-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-daemon-driver-storage-logical-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-daemon-driver-interface-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-bash-completion-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-admin-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-daemon-driver-nwfilter-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-daemon-driver-storage-rbd-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-daemon-driver-storage-scsi-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-lock-sanlock-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-glib-3.0.0-1.el8.x86_64
libvirt-daemon-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-daemon-config-nwfilter-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-daemon-driver-storage-iscsi-direct-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-daemon-driver-storage-disk-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-daemon-driver-secret-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-daemon-driver-storage-core-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-daemon-driver-storage-mpath-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-daemon-driver-nodedev-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-daemon-kvm-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-libs-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-daemon-driver-storage-gluster-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-daemon-driver-storage-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64
libvirt-daemon-config-network-6.0.0-25.4.module+el8.2.1+8060+c0c58169.x86_64


These all come from advanced-virt-for-rhel-8-x86_64-rpms
I just checked on a regular rhel system, yes you can find the libvirt package on the rhel-8-for-x86_64-appstream-rpms

The necessary packages that are installed are handled by the engine though, so this wasn't manually done.

Comment 6 YongkuiGuo 2020-11-13 11:28:41 UTC
I can reproduce this issue on rhel8.3 host (not RHV) if the libvirt package has not been installed.  After installing the libvirt package, there's no problem.

Comment 7 koconnor 2020-11-13 12:32:43 UTC
I could manually install libvirt also and i presume this issue would be gone too but when adding a host to rhv, the engine installs what it requires on the host. 
It seems it doesn't add this package, or at least it didn't in my case, just the ones i listed above. 
I don't know if this is an issue or just a random occurrence. If anyone else has a rhv 4.4 environment with a host setup of rhel 8.2 + rhv packages, could they also check this.
If it works for you then we can close this bug otherwise we should fix this to reflect all occurrences of libvirt packages.

Comment 8 Frank Danapfel 2020-11-13 13:55:36 UTC
The reason why the libvirt package is used to get the information for the virtualization vendor is because this package was always required so far when using any form of XEN or KVM virtualization on RHEL, and we couldn't find any other method to get this information that worked across different virtualization setups (bare RHEL+XEN, bare RHEL+KVM, RHEV 3.x, RHV4.x, ...)

So if RHV4.4 no longer requires the libvirt packge to be installed on the hypervisor then it doesn't make sense for me to install the package just for the command to get the info about the virtualization vendor in vhostmd to work correctly.

Therefore my recommendation would be to try reach out to the colleagues responsible for RHV4.4 to find out if it is indeed the case that the libvirt package is no longer needed, or if it is due to a bug or something else that the package isn't installed on your system.

If it is the former then the RHV colleagues should provide suggestions for what method to use instead of the current one to retrieve the info for the virtualization vendor metric on the hypervisor.

If it is the later, and the libvirt package is missing due to a bug or something else then we should try to get this fixed, because if the package is missing by accident then there could potentially be amany other issues with RHV since functionality depending on that package will be broken.

Comment 9 Steffen Froemer 2020-11-13 14:19:10 UTC
I reproduced this in my RHV-4.4 environment.
The libvirt-package is a meta-package, which does not provide any files. It only have all additional libvirt-* packages as dependency, to ease an installation.

A RHEL-8.2 host is failing, while a RHV-H 4.4 succeed. This means, on RHV-H (imagebased hypervisor) the libvirt-package is installed. 
On the RHEL-8.2 it is not. 

@Karen: for your test I would propose to install it manually.

The host-deploy mechanism in RHV should install this packages as well. I will change this bug to have this addressed. I also sent a mail to RHV-folks.

Comment 10 Steffen Froemer 2020-11-13 14:24:11 UTC
Changing Product/Component

During `ovirt-host-deploy` the package `libvirt` is not installed.

Metrics in component `vhostmd` require this package to identify Virtualization Vendor. This is required for virtualized SAP systems.
RHV-H does have libvirt package installed.

Comment 11 Martin Perina 2020-11-16 05:25:32 UTC
RHV itself doesn't require libvirt package and it works fine, so it makes sense to add libvirt dependency only to VDSM vhostmd hook package only. As vhostmd hook is specialized component not mandatory for RHV, lowering severity to medium and targeting to 4.4.4

Comment 14 Steffen Froemer 2020-11-16 14:17:27 UTC
(In reply to Martin Perina from comment #11)
> RHV itself doesn't require libvirt package and it works fine, so it makes
> sense to add libvirt dependency only to VDSM vhostmd hook package only. As
> vhostmd hook is specialized component not mandatory for RHV, lowering
> severity to medium and targeting to 4.4.4

Agree in this solution. 
As SAP workload is not certified on RHV-4.4 environment by today, applying workaround of manually installing libvirt-package until 4.4.4 is released should be fine.

Karen, would this be suitable to you?

Comment 15 koconnor 2020-11-16 15:55:15 UTC
Hi Steffen, 
Yea sounds good! I informed SAP about the issue, they said it's minor and they gave the go ahead to verifying support now for NW on rhv 4.4.

Comment 16 Steffen Froemer 2020-11-16 22:23:03 UTC
With confirmation from Karen, this resolution can go ahead.

For QE, following test needs to be successful on RHEL-8.2 hosts.

  # yum install -y vhostmd
  # rpm -q --queryformat "%{VENDOR}\n" libvirt | sort -u
  Red Hat, Inc.

Comment 17 Marcin Sobczyk 2020-11-17 16:00:38 UTC
> The reason why the libvirt package is used to get the information for the virtualization vendor is because this package was always required so far when using any form of XEN or KVM virtualization on RHEL

This is not true. The 'vhostmd' version included in 4.3 didn't require 'libvirt' package. The change that introduced the requirement is here [1]. This is basically adding an implicit package dependency without reflecting it properly on the RPM level. This is not a bug on RHV side.

> RHV itself doesn't require libvirt package and it works fine, so it makes sense to add libvirt dependency only to VDSM vhostmd hook package only

I really don't want to do this. We always had pretty complex requirements on libvirt packages in vdsm's spec [2] and I don't want to add some metapackage we never required before out of the blue, since I can't fully predict the consequences.

> For QE, following test needs to be successful on RHEL-8.2 hosts.

>  # yum install -y vhostmd
>  # rpm -q --queryformat "%{VENDOR}\n" libvirt | sort -u
>  Red Hat, Inc.

This use case especially won't be satisfied by adding 'libvirt' metapackage as a dependency to 'vdsm-hook-vhostmd' - 'vhostmd' doesn't require the hook, it's the other way around.

I see this as 'vhostmd' bug. It's clear that it's not 'libvirt' metapackage that defines a machine's capability of acting as a virtualization host. If anything I would be aiming at 'libvirt-libs' or 'libvirt-daemon', since you can't really function without them. So changing [3] (and other 'libvirt' RPM references in the XML) to 'libvirt-libs/daemon' is my short-term fix proposal.

In the long run, a prettier solution would be to produce 'vhostmd-libvirt' and 'vhostmd-xen' packages that would require both 'vhostmd' and virtualization-vendor-specific packages. Each of them would only query the RPMs that are really expected to be there.

[1] https://github.com/vhostmd/vhostmd/commit/d1a230d6d3ca4ded376f6522688d379bac347fbe
[2] https://github.com/oVirt/vdsm/blob/8cf1da2e2b0d95ad774f8ae56b9445d30408f8a1/vdsm.spec.in#L208
[3] https://github.com/vhostmd/vhostmd/blob/99995e4ba138f43b277620bd43a096c72f354548/vhostmd.xml#L56

Comment 18 Martin Perina 2020-11-18 06:09:13 UTC
Comment 17 makes much more sense than the original idea, so moving the bug to platform to fix that dependency on vhostmd package

Comment 20 Michal Skrivanek 2020-11-18 14:10:16 UTC
(In reply to Marcin Sobczyk from comment #17)
[...]
> I really don't want to do this. We always had pretty complex requirements on
> libvirt packages in vdsm's spec [2] and I don't want to add some metapackage
> we never required before out of the blue, since I can't fully predict the
> consequences.

for the record, we required "libvirt" in RHEL 6 (RHV 3.4)
vhostmd is fairly dated, so no wonder...

This was changes in RHEL7, "libvirt" does not require qemu-kvm, "libvirt-daemon-kvm" does.

Comment 21 Martin Tessun 2020-11-26 08:50:04 UTC
(In reply to Michal Skrivanek from comment #20)
> (In reply to Marcin Sobczyk from comment #17)
> [...]
> > I really don't want to do this. We always had pretty complex requirements on
> > libvirt packages in vdsm's spec [2] and I don't want to add some metapackage
> > we never required before out of the blue, since I can't fully predict the
> > consequences.
> 
> for the record, we required "libvirt" in RHEL 6 (RHV 3.4)
> vhostmd is fairly dated, so no wonder...
> 
> This was changes in RHEL7, "libvirt" does not require qemu-kvm,
> "libvirt-daemon-kvm" does.

So to me changing the dependencies of vhostmd seems the correct path forward.

Comment 22 John Ferlan 2020-11-30 16:21:22 UTC
Rich - assigning to you directly as it seems you have dealt with vhostmd issues previously.

Comment 23 Richard W.M. Jones 2020-11-30 16:41:38 UTC
  Requires: libvirt

I suspect no one will be overjoyed about vhostmd having a hard
dependency on libvirt, since it pulls in a lot of stuff.  How about:

  Suggests: libvirt

It will install libvirt in the default configuration of dnf, but it
could be uninstalled.

I honestly think the real solution is to fix the command in vhostmd.xml,
but I'm not sure there is a good alternative at the moment (asking on
virt-devel).

Anyway it's fine if you want me to add either Requires/Suggests as above
for z-stream.

Comment 24 Richard W.M. Jones 2020-11-30 17:01:57 UTC
Dan suggested that we change the XML file instead so it does something like:

$ rpm -q --qf '%{VENDOR}\n' -qf /etc/os-release 
Fedora Project

(other files might be used).  I will need to discuss this upstream.  We
can go with the simpler z-stream fix in the meantime.

Comment 25 Richard W.M. Jones 2020-12-01 11:49:30 UTC
rhel 8.4.0: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=33403581

Comment 26 YongkuiGuo 2020-12-02 09:54:15 UTC
(In reply to Richard W.M. Jones from comment #25)
> rhel 8.4.0:
> https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=33403581

Hi rjones,
libvirt package has been added for the latest vhostmd(1.1-5) as dependency. Is it not proper to use 'rpm -q --qf '%{VENDOR}\n' -qf /etc/os-release '?

Comment 27 Richard W.M. Jones 2020-12-02 10:32:29 UTC
This would only be a simple, interim fix.

How to fix it long term is being discussed upstream
(https://github.com/vhostmd/vhostmd/issues/7) which might be using
/etc/os-release.  Actually the real problem upstream is what to do
about "VirtualizationProductInfo".

Comment 28 koconnor 2020-12-02 11:01:17 UTC
(In reply to Richard W.M. Jones from comment #27)
> This would only be a simple, interim fix.
> 
> How to fix it long term is being discussed upstream
> (https://github.com/vhostmd/vhostmd/issues/7) which might be using
> /etc/os-release.  Actually the real problem upstream is what to do
> about "VirtualizationProductInfo".

Hi Richard, I contacted SAP and I'm just waiting for feedback here for you.

Comment 29 Michael Trapp 2020-12-03 08:34:13 UTC
actually vhostmd itself uses libvirt functions, that's part of the changes for the virtio support

from a RHEL 8.2

# rpm -qf /usr/sbin/vhostmd
vhostmd-1.1-4.el8.x86_64
# ldd -d /usr/sbin/vhostmd | grep virt
	libvirt.so.0 => /lib64/libvirt.so.0 (0x00007f9be758d000)
# rpm -qf /lib64/libvirt.so.0
libvirt-libs-4.5.0-42.module+el8.2.0+6024+15a2423f.x86_64

I guess, changing the xml would not solve the dependency issue

Comment 30 Richard W.M. Jones 2020-12-03 10:08:44 UTC
libvirt is a meta-package which pulls in many unrelated features, including
parts of the Xen hypervisor.

libvirt-libs just includes the client library.

So we very much do want to avoid the libvirt dependency if at all possible.

Comment 33 Richard W.M. Jones 2020-12-07 15:30:33 UTC
There is one failed test which I'm unable to waive:

https://dashboard.osci.redhat.com/#/artifact/brew-build/aid/33403581

Comment 34 Henning Sackewitz 2020-12-07 16:42:11 UTC
Some more info from the SAP side: basically any query is fine for us that:
- returns Hypervisor product-related info/version
- works on SLES, RHEL and RHV,
- is able to get the info from the default or even minimum installation pattern
Qemu information was the next best thing to KVM-related info we could get.
Would libvirt-libs - or any other package - match these conditions ?

Comment 35 YongkuiGuo 2020-12-16 02:40:04 UTC
Verified with package:
vhostmd-1.1-5.el8.x86_64


Steps:

1. 
# yum localinstall -y vhostmd-1.1-5.el8.x86_64.rpm 
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

Last metadata expiration check: 0:00:16 ago on Tue 15 Dec 2020 09:35:40 PM EST.
Dependencies resolved.
============================================================================================================================================================================================
 Package                             Architecture                       Version                                                              Repository                                Size
============================================================================================================================================================================================
Installing:
 vhostmd                             x86_64                             1.1-5.el8                                                            @commandline                              56 k
Installing dependencies:
 libvirt                             x86_64                             6.0.0-30.module+el8.4.0+8705+34397d87                                rhel8-app                                 56 k

Transaction Summary
============================================================================================================================================================================================
...


The libvirt package will be installed as the dependency of vhostmd.

2.
# rpm -q --queryformat "%{VENDOR}\n" libvirt | sort -u
Red Hat, Inc.

Comment 36 YongkuiGuo 2021-01-22 02:10:15 UTC
The zstream flag has been set, but It seems there is no corresponding bug for rhel8.3.0.z.

Comment 38 errata-xmlrpc 2021-05-18 15:06:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (vhostmd bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:1681