Bug 1727117 - [RFE] Reduce installed libvirt components
Summary: [RFE] Reduce installed libvirt components
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Virtualization
Version: 2.3.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 2.4.0
Assignee: sgott
QA Contact: Israel Pinto
URL:
Whiteboard:
Depends On:
Blocks: 1745034
TreeView+ depends on / blocked
 
Reported: 2019-07-04 13:58 UTC by Jaroslav Suchanek
Modified: 2020-07-28 19:09 UTC (History)
7 users (show)

Fixed In Version: hyperconverged-cluster-operator-container-v2.4.0-49 hco-bundle-registry-container-v2.3.0-306 virt-operator-container-v2.4.0-45
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-28 19:09:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:3194 0 None None None 2020-07-28 19:09:53 UTC

Description Jaroslav Suchanek 2019-07-04 13:58:43 UTC
Rephrasing mail send by Andrea Bolognani to internal mailing list:

It looks like KubeVirt is currently[1] installing libvirt using a
very straightforward dnf invocation:

  ENV LIBVIRT_VERSION 5.1.0

  RUN dnf install -y dnf-plugins-core && \
      dnf copr enable -y @virtmaint-sig/virt-preview && \
      dnf install -y \
          libvirt-daemon-kvm-${LIBVIRT_VERSION} \
          libvirt-client-${LIBVIRT_VERSION} \
          ...

This will drag in a bunch of libvirt components which might not be useful
to KubeVirt, such as for example nwfilter and
device assignment support, as well as drivers for a number of storage
technologies that IIUC are not going to be used.

Suggestion is to look into tailoring the above to
KubeVirt's actual requirements, which would probably result in
something more along the lines of

  dnf install -y
      libvirt-daemon \
      libvirt-daemon-driver-qemu \
      libvirt-daemon-driver-secret \
      libvirt-daemon-driver-storage-disk \
      libvirt-client \
      qemu-kvm

and reduced disk and memory footprints, as well as attach surface.

[1] https://github.com/kubevirt/libvirt/blob/master/Dockerfile

Comment 2 Andrea Bolognani 2019-11-17 17:30:33 UTC
I've posted a PR implementing this change upstream:

  https://github.com/kubevirt/libvirt/pull/37

It builds on two other PRs that significantly change how the
kubevirt/libvirt container image is generated, and which have not
been merged yet, so it could take a while before the change makes
its way upstream; it also needs significantly more testing than
what I have been able to give it on my own.

Additionally, I'm unclear on what needs to happen, once the change
has been approved upstream, before it can benefit Red Hat customers:
I assume it will have to be backported somehow...

Anyway, things are moving :)

Comment 3 Andrea Bolognani 2019-11-20 14:23:09 UTC
This has now been merged upstream:

  https://github.com/kubevirt/libvirt/commit/d6cd8894a5c13ddb8ca03379860238f9043eec22

I also opened a PR to switch KubeVirt itself to use the new image:

  https://github.com/kubevirt/kubevirt/pull/2890

Comment 4 Fabian Deutsch 2019-11-20 14:29:55 UTC
Andrea, many thanks for contributing this patch.

Petr, please work with Andrea through the process to make sure that kubevirt master will see this enhancement.

Comment 5 Andrea Bolognani 2019-11-21 10:01:13 UTC
(In reply to Fabian Deutsch from comment #4)
> Petr, please work with Andrea through the process to make sure that kubevirt
> master will see this enhancement.

It's in master already:

  https://github.com/kubevirt/kubevirt/commit/a174131cea8ae3362b58b9b6f4f48992efa21f8d

What I'm unclear about is the downstream process, but I assume you
guys have that part figured out already and don't necessarily need
me to be involved in it... I'm always happy to help where I can,
though :)

Comment 6 Petr Kotas 2019-11-21 10:14:01 UTC
I see Andreas PR merged, thank you for that!

I might have a question or two for downstream though. Nevertheless, good one Andrea.

Comment 14 Petr Kotas 2020-02-13 09:31:05 UTC
The downstream PR has been merged. I believe this bug can go to POST.

Comment 17 Israel Pinto 2020-02-24 12:13:55 UTC
Verify with:
oc get kv -n openshift-cnv -o yaml | grep -i operatorversion
    operatorVersion: v0.26.1

Create vm and check libvirt at compute pod.
[root@vm-cirros /]# rpm -qa | grep libvirt 
libvirt-libs-5.6.0-10.module+el8.1.1+5309+6d656f05.x86_64
libvirt-daemon-5.6.0-10.module+el8.1.1+5309+6d656f05.x86_64
libvirt-client-5.6.0-10.module+el8.1.1+5309+6d656f05.x86_64
libvirt-daemon-driver-qemu-5.6.0-10.module+el8.1.1+5309+6d656f05.x86_64
libvirt-bash-completion-5.6.0-10.module+el8.1.1+5309+6d656f05.x86_64

Comment 18 sgott 2020-03-06 12:50:01 UTC
Moving this BZ back to NEW and deferring to the next release. We removed too many components, which caused other issues: https://bugzilla.redhat.com/show_bug.cgi?id=1810493

Comment 22 Israel Pinto 2020-07-01 07:11:44 UTC
Test runs with new Kernel RHEL 8.2 are passing 
Migration is working.

Moving to verify.

Comment 25 errata-xmlrpc 2020-07-28 19:09:38 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, 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/RHSA-2020:3194


Note You need to log in before you can comment on or make changes to this bug.