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 1024393 - libvirt-daemon-lxc kind of heavy on the dependencies.
Summary: libvirt-daemon-lxc kind of heavy on the dependencies.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Daniel Berrangé
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-29 15:01 UTC by Bhavna Sarathy
Modified: 2015-06-11 01:10 UTC (History)
18 users (show)

Fixed In Version: libvirt-1.1.1-11.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1012198
Environment:
Last Closed: 2014-06-13 09:45:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Bhavna Sarathy 2013-10-29 15:01:48 UTC
Please add this fix into RHEL 7.0 that will reduce the libvirt-lxc dependencies 

+++ This bug was initially created as a clone of Bug #1012198 +++

From the basically-minimal Fedora 20 Cloud image, installing libvirt-daemon-lxc pulls in.... kind of a lot of stuff. Could we reduce this? It would be nice for the purpose of having a cloud image which runs containers. The more lightweight the "outer shell" can be, the more room there is for the actual contents.


I'd prefer the advantages of libvirt lxc over the lxc tools, but, this is literally 150x bigger.

List of deps follows.


================================================================================
 Package                         Arch   Version           Repository       Size
================================================================================
Installing:
 libvirt-daemon-lxc              x86_64 1.1.2-3.fc20      updates-testing  34 k
Installing for dependencies:
 augeas-libs                     x86_64 1.1.0-2.fc20      fedora          323 k
 boost-system                    x86_64 1.54.0-5.fc20     fedora           38 k
 boost-thread                    x86_64 1.54.0-5.fc20     fedora           57 k
 bzip2                           x86_64 1.0.6-9.fc20      fedora           52 k
 ceph-libs                       x86_64 0.67.3-1.fc20     updates-testing 1.7 M
 corosync                        x86_64 2.3.2-1.fc20      fedora          185 k
 corosynclib                     x86_64 2.3.2-1.fc20      fedora          110 k
 cryptopp                        x86_64 5.6.2-3.fc20      fedora          1.0 M
 cyrus-sasl                      x86_64 2.1.26-12.fc20    updates-testing  87 k
 cyrus-sasl-md5                  x86_64 2.1.26-12.fc20    updates-testing  55 k
 device-mapper-event             x86_64 1.02.81-1.fc20    updates-testing 140 k
 device-mapper-event-libs        x86_64 1.02.81-1.fc20    updates-testing 134 k
 device-mapper-persistent-data   x86_64 0.2.7-1.fc20      updates-testing 362 k
 ebtables                        x86_64 2.0.10-11.fc20    fedora          120 k
 fuse-libs                       x86_64 2.9.3-2.fc20      fedora           92 k
 gettext                         x86_64 0.18.3.1-1.fc20   fedora          969 k
 gettext-libs                    x86_64 0.18.3.1-1.fc20   fedora          258 k
 glusterfs                       x86_64 3.4.0-8.fc20      fedora          850 k
 glusterfs-api                   x86_64 3.4.0-8.fc20      fedora           49 k
 glusterfs-fuse                  x86_64 3.4.0-8.fc20      fedora           91 k
 glusterfs-libs                  x86_64 3.4.0-8.fc20      fedora          225 k
 gnutls-dane                     x86_64 3.1.13-2.fc20     fedora           49 k
 gnutls-utils                    x86_64 3.1.13-2.fc20     fedora          267 k
 iscsi-initiator-utils           x86_64 6.2.0.873-12.fc20 fedora          459 k
 keyutils                        x86_64 1.5.6-2.fc20      updates-testing  53 k
 ldns                            x86_64 1.6.16-6.fc20     fedora          469 k
 leveldb                         x86_64 1.12.0-5.fc20     fedora          160 k
 libaio                          x86_64 0.3.109-8.fc20    fedora           23 k
 libcroco                        x86_64 0.6.8-3.fc20      fedora          103 k
 libevent                        x86_64 2.0.21-3.fc20     fedora          210 k
 libibverbs                      x86_64 1.1.7-3.fc20      fedora           48 k
 libiscsi                        x86_64 1.9.0-4.fc20      fedora           59 k
 libnfsidmap                     x86_64 0.25-7.fc20       fedora           45 k
 libqb                           x86_64 0.16.0-1.fc20     fedora           92 k
 librdmacm                       x86_64 1.0.17-2.fc20     fedora           58 k
 libtirpc                        x86_64 0.2.3-4.fc20      fedora           82 k
 libunistring                    x86_64 0.9.3-9.fc20      fedora          291 k
 libvirt-client                  x86_64 1.1.2-3.fc20      updates-testing 5.4 M
 libvirt-daemon                  x86_64 1.1.2-3.fc20      updates-testing 2.2 M
 libvirt-daemon-driver-interface x86_64 1.1.2-3.fc20      updates-testing  75 k
 libvirt-daemon-driver-lxc       x86_64 1.1.2-3.fc20      updates-testing 117 k
 libvirt-daemon-driver-network   x86_64 1.1.2-3.fc20      updates-testing  87 k
 libvirt-daemon-driver-nodedev   x86_64 1.1.2-3.fc20      updates-testing  75 k
 libvirt-daemon-driver-nwfilter  x86_64 1.1.2-3.fc20      updates-testing 100 k
 libvirt-daemon-driver-secret    x86_64 1.1.2-3.fc20      updates-testing  70 k
 libvirt-daemon-driver-storage   x86_64 1.1.2-3.fc20      updates-testing 115 k
 libwsman1                       x86_64 2.3.6-8.fc20      fedora          121 k
 libxslt                         x86_64 1.1.28-5.fc20     fedora          241 k
 lvm2                            x86_64 2.02.102-1.fc20   updates-testing 755 k
 lvm2-libs                       x86_64 2.02.102-1.fc20   updates-testing 625 k
 lzo                             x86_64 2.06-5.fc20       fedora           58 k
 lzop                            x86_64 1.03-9.fc20       fedora           54 k
 net-snmp-libs                   x86_64 1:5.7.2-15.fc20   fedora          745 k
 netcf-libs                      x86_64 0.2.3-5.fc20      fedora           65 k
 nfs-utils                       x86_64 1:1.2.8-4.1.fc20  fedora          356 k
 nmap-ncat                       x86_64 2:6.40-2.fc20     fedora          123 k
 numactl-libs                    x86_64 2.0.8-4.fc20      fedora           28 k
 numad                           x86_64 0.5-12.20130814git.fc20
                                                          fedora           30 k
 pm-utils                        x86_64 1.4.1-26.fc20     fedora          139 k
 qemu-img                        x86_64 2:1.6.0-7.fc20    fedora          479 k
 quota                           x86_64 1:4.01-10.fc20    fedora          177 k
 quota-nls                       noarch 1:4.01-10.fc20    fedora           89 k
 radvd                           x86_64 1.9.2-4.fc20      fedora           85 k
 rpcbind                         x86_64 0.2.1-0.1.fc20    fedora           56 k
 sheepdog                        x86_64 0.3.0-5.fc20      fedora           95 k
 snappy                          x86_64 1.1.0-2.fc20      fedora           40 k
 socat                           x86_64 1.7.2.2-3.fc20    fedora          264 k
 tcp_wrappers                    x86_64 7.6-76.fc20       fedora           80 k
 unbound-libs                    x86_64 1.4.20-19.fc20    fedora          293 k
 yajl                            x86_64 2.0.4-3.fc20      fedora           38 k

Transaction Summary
================================================================================
Install  1 Package (+70 Dependent packages)

Total download size: 22 M
Installed size: 79 M

--- Additional comment from Alexander Larsson on 2013-09-26 04:44:08 EDT ---

 libvirt-client                  x86_64 1.1.2-3.fc20      updates-testing 5.4 M

This has a 1.5 meg ChangeLog.gz, and 15 megs of translations. That seems a bit large...

 ceph-libs                       x86_64 0.67.3-1.fc20     updates-testing 1.7 M
Also kind of large, does libvirt really depend on Ceph?

--- Additional comment from Daniel Berrange on 2013-09-26 04:53:37 EDT ---

(In reply to Alexander Larsson from comment #1)
>  libvirt-client                  x86_64 1.1.2-3.fc20      updates-testing
> 5.4 M
> 
> This has a 1.5 meg ChangeLog.gz, and 15 megs of translations. That seems a
> bit large...

The changelog is moved into -devel in current builds so won't impact. There's not really anything we can do about translations unless we want to screw over non-english speakers.

> 
>  ceph-libs                       x86_64 0.67.3-1.fc20     updates-testing
> 1.7 M
> Also kind of large, does libvirt really depend on Ceph?

Yes, the storage management features use ceph.

--- Additional comment from Matthew Miller on 2013-10-04 15:31:29 EDT ---

Update: something is now pulling in Avahi. I *really* don't want avahi on the cloud image.

--- Additional comment from Alexander Larsson on 2013-10-08 04:31:52 EDT ---

avahi daemon, or avahi libs?

--- Additional comment from Daniel Berrange on 2013-10-08 05:01:08 EDT ---

libvirt only depends on avahi-libs, so if something is pulling in the daemon, it isn't libvirt directly.

--- Additional comment from Matthew Miller on 2013-10-08 07:56:57 EDT ---

avahi-libs now pulls in avahi daemon -- that's bug #913168, apparently.

--- Additional comment from Daniel Berrange on 2013-10-08 10:02:40 EDT ---

Oh actually, I just noticed you are installing the high level libvirt lxc package:

> Installing:
>   libvirt-daemon-lxc              x86_64 1.1.2-3.fc20      updates-testing  34 

At the cost of breaking many libvirt APIs you could switch to installing the finer grained package  'libvirt-daemon-driver-lxc'. That would pull in just the lxc hypervisor APIs, which is closer in terms of functionality to the lxc tools. 

Of course if the app using libvirt needs to use non-hypervisor APIs, you're still doomed because it'll need to pull in the other libvirt-daemon-driver-* packages anyway.  It also might lead to bug reports from users who find that various parts of libvirt are non-functional, so not sure whether its a good idea for the cloud image or not really.

--- Additional comment from Matthew Miller on 2013-10-08 15:41:03 EDT ---

I was excited about that suggestion for a minute, but it turns out that if I just do `yum install libvirt-daemon-driver-lxc`, everything is pulled in except

  hwdata
  libpciaccess
  libvirt-daemon-driver-interface
  libvirt-daemon-driver-nodedev
  libvirt-daemon-driver-nwfilter
  libvirt-daemon-driver-secret
  libvirt-daemon-driver-storage
  libvirt-daemon-lxc

So basically it looks like everything is pulled in _except_ the APIs. This saves about 5MB -- two megabytes compressed -- and doesn't really address the security-respin concern. So I think we're better off with the higher-level unless we can somehow make that have a significant impact.

Thanks for the idea, though!

--- Additional comment from Daniel Berrange on 2013-10-09 05:11:12 EDT ---

(In reply to Matthew Miller from comment #8)
> I was excited about that suggestion for a minute, but it turns out that if I
> just do `yum install libvirt-daemon-driver-lxc`, everything is pulled in
> except
> 
>   hwdata
>   libpciaccess
>   libvirt-daemon-driver-interface
>   libvirt-daemon-driver-nodedev
>   libvirt-daemon-driver-nwfilter
>   libvirt-daemon-driver-secret
>   libvirt-daemon-driver-storage
>   libvirt-daemon-lxc
> 
> So basically it looks like everything is pulled in _except_ the APIs. This
> saves about 5MB -- two megabytes compressed -- and doesn't really address
> the security-respin concern. So I think we're better off with the
> higher-level unless we can somehow make that have a significant impact.

Smells like something is wrong there then. All those storage related deps like ceph/gluster/etc should only be required by the libvirt-daemon-driver-storage sub-RPM.

--- Additional comment from Matthew Miller on 2013-10-09 08:02:46 EDT ---

(In reply to Daniel Berrange from comment #9)
> Smells like something is wrong there then. All those storage related deps
> like ceph/gluster/etc should only be required by the
> libvirt-daemon-driver-storage sub-RPM.

libvirt-daemon-driver-lxc requires libvirt-daemon, and then that pulls in all the other stuff.

--- Additional comment from Daniel Berrange on 2013-10-09 08:30:16 EDT ---

Ok, that definitely sounds broken then. The libvirt-daemon package itself should be pretty minimal on deps since it only really contains RPC code.

--- Additional comment from Daniel Berrange on 2013-10-29 07:56:02 EDT ---

This patch removes the many bogus deps from the libvirt-daemon RPM, pushing them down to the libvirt-daemon-driver-XXXX RPMs which actually require them.

On a Fedora 19 host, I installed a minimal container using

 # yum -y --releasever=19 --nogpg --installroot=/var/lib/libvirt/filesystems/libvirtsize1 \
          --disablerepo='*' --enablerepo=fedora install \
          systemd passwd yum fedora-release vim-minimal openssh-server procps-ng

And then installed just 'libvirt-daemon-driver-lxc' - this pulls in libvirt-daemon-driver-network, libvirt-daemon and libvirt-client.

With the existing packaging I see this size usage

# du -h -c -s /var/lib/libvirt/filesystems/libvirtsize1
453M	/var/lib/libvirt/filesystems/libvirtsize1
453M	total

With the patch applied, we save 41 MB:

# du -h -c -s /var/lib/libvirt/filesystems/libvirtsize2
412M	/var/lib/libvirt/filesystems/libvirtsize2
412M	total

The following packages are now, no longer required in the minimal install

augeas-libs-1.0.0-2.fc19.x86_64
boost-system-1.53.0-6.fc19.x86_64
boost-thread-1.53.0-6.fc19.x86_64
bzip2-1.0.6-8.fc19.x86_64
ceph-libs-0.56.4-1.fc19.x86_64
corosync-2.3.0-3.fc19.x86_64
corosynclib-2.3.0-3.fc19.x86_64
cryptopp-5.6.2-2.fc19.x86_64
device-mapper-event-1.02.77-9.fc19.x86_64
device-mapper-event-libs-1.02.77-9.fc19.x86_64
device-mapper-persistent-data-0.1.4-3.fc19.x86_64
e2fsprogs-libs-1.42.7-2.fc19.x86_64
ebtables-2.0.10-8.fc19.x86_64
fuse-2.9.2-3.fc19.x86_64
glusterfs-3.4.0-0.5.beta2.fc19.x86_64
glusterfs-api-3.4.0-0.5.beta2.fc19.x86_64
glusterfs-fuse-3.4.0-0.5.beta2.fc19.x86_64
iscsi-initiator-utils-6.2.0.873-6.fc19.x86_64
keyutils-1.5.5-4.fc19.x86_64
leveldb-1.9.0-1.fc19.x86_64
libaio-0.3.109-7.fc19.x86_64
libibverbs-1.1.6-6.fc19.x86_64
libiscsi-1.7.0-4.fc19.x86_64
libnfsidmap-0.25-5.fc19.x86_64
libqb-0.14.4-2.fc19.x86_64
librdmacm-1.0.17-1.fc19.x86_64
libtirpc-0.2.3-2.fc19.x86_64
libxslt-1.1.28-3.fc19.x86_64
lvm2-2.02.98-9.fc19.x86_64
lvm2-libs-2.02.98-9.fc19.x86_64
lzo-2.06-4.fc19.x86_64
lzop-1.03-8.fc19.x86_64
netcf-libs-0.2.3-4.fc19.x86_64
net-snmp-libs-5.7.2-11.fc19.x86_64
nfs-utils-1.2.8-2.0.fc19.x86_64
qemu-img-1.4.2-3.fc19.x86_64
quota-4.01-6.fc19.x86_64
quota-nls-4.01-6.fc19.noarch
rpcbind-0.2.0-21.fc19.x86_64
sheepdog-0.3.0-4.fc19.x86_64
snappy-1.1.0-1.fc19.x86_64
tcp_wrappers-7.6-73.fc19.x86_64
which-2.20-5.fc19.x86_64
xz-5.1.2-4alpha.fc19.x86_64


I don't think we can get much smaller than this without either major code changes to libvirt, or improvements to RPM to allow exclusion of things like translations without breaking upgrades

--- Additional comment from Daniel Berrange on 2013-10-29 07:57:41 EDT ---

Oh, note that since I used F19 for this test, it still has the 1.5 MB changelog.gz file present, that is gone in rawhide/f20.

Comment 1 Bill Nottingham 2013-10-29 15:11:56 UTC
Additional note for RHEL: unlike Fedora, where all built things end up in the repo, if we're changing the dependency stack in RHEL we need to ensure that the proper bits still end up in the product where necessary.

Comment 2 Daniel Berrangé 2013-10-29 15:15:28 UTC
We're not changing the overall dependency stack of libvirt. This is merely moving some deps out of 'libvirt-daemon' and into 'libvirt-daemon-driver-XXX'. Overall the total number of deps is unchanged. This just allows someone doing 'yum install libvirt-daemon-driver-lxc' to get few bits pulled in by default.

Comment 3 Daniel Berrangé 2013-10-29 15:18:28 UTC
Fix available upstream

commit 23142ac91a86309214923f446be9d0dd54d99d95
Author: Daniel P. Berrange <berrange>
Date:   Tue Oct 29 11:27:45 2013 +0000

    Push RPM deps down into libvirt-daemon-driver-XXXX sub-RPMs
    
    For inexplicable reasons, many of the 3rd party package deps
    were left against the 'libvirt-daemon' RPM when the drivers
    were split out. This makes a minimal install heavier that
    it should be. Push them all down into libvirt-daemon-driver-XXX
    so they're only pulled in when truly needed
    
    With this change applied, a minimal install of just the
    libvirt-daemon-driver-lxc RPM is reduced by 41 MB on a
    Fedora 19 host.
    
    Signed-off-by: Daniel P. Berrange <berrange>

Comment 4 Daniel Berrangé 2013-10-29 15:19:23 UTC
Should also pull in the changelog fix

commit e23216da9a9318df920abb11b02582b81515c862
Author: Cole Robinson <crobinso>
Date:   Wed Sep 25 13:20:40 2013 -0400

    spec: Clean up distribution of ChangeLog (and others)
    
    - Move COPYING* to libvirt-client, so every package pulls them in
    - Move AUTHORS ChangeLog.gz NEWS README TODO from -daemon to -docs
    - Drop duplicate distribution of docs in -python
    
    https://bugzilla.redhat.com/show_bug.cgi?id=977099

Comment 7 Luwen Su 2013-11-22 06:34:50 UTC
1.Install a minimal install rhel7 guest , named test
2.Configure tests yum repo , make sure that inclue latest packages
3.
#yum install  libvirt-daemon-lxc  

Dependencies Resolved

================================================================================
 Package                        Arch   Version                Repository   Size
================================================================================
Installing:
 libvirt-daemon-lxc             x86_64 1.1.1-12.el7           RHEVH        50 k
Installing for dependencies:
 augeas-libs                    x86_64 1.1.0-4.el7            RHEVH       321 k
 cyrus-sasl                     x86_64 2.1.26-13.el7          RHEVH        86 k
 cyrus-sasl-md5                 x86_64 2.1.26-13.el7          RHEVH        54 k
 fuse-libs                      x86_64 2.9.2-3.el7            RHEL-Server  90 k
 glusterfs-api                  x86_64 3.4.0.40rhs-2.el7      RHEVH        46 k
 glusterfs-libs                 x86_64 3.4.0.40rhs-2.el7      RHEVH       232 k
 gnutls-dane                    x86_64 3.1.16-1.el7           RHEVH        48 k
 gnutls-utils                   x86_64 3.1.16-1.el7           RHEVH       264 k
 iptables-services              x86_64 1.4.19.1-1.el7         RHEVH        42 k
 iscsi-initiator-utils          x86_64 6.2.0.873-15.el7       RHEVH       457 k
 keyutils                       x86_64 1.5.8-1.el7            RHEVH        52 k
 ldns                           x86_64 1.6.16-5.el7           RHEVH       468 k
 libaio                         x86_64 0.3.109-9.el7          RHEL-Server  23 k
 libcgroup                      x86_64 0.40-0.rc1.3.el7       RHEVH        59 k
 libevent                       x86_64 2.0.21-2.el7           RHEVH       208 k
 libiscsi                       x86_64 1.9.0-3.el7            RHEVH        57 k
 libnfsidmap                    x86_64 0.25-7.el7             RHEVH        44 k
 libtirpc                       x86_64 0.2.3-3.el7            RHEVH        80 k
 libvirt-client                 x86_64 1.1.1-12.el7           RHEVH       3.6 M
 libvirt-daemon                 x86_64 1.1.1-12.el7           RHEVH       770 k
 libvirt-daemon-driver-interface
                                x86_64 1.1.1-12.el7           RHEVH        92 k
 libvirt-daemon-driver-lxc      x86_64 1.1.1-12.el7           RHEVH       133 k
 libvirt-daemon-driver-network  x86_64 1.1.1-12.el7           RHEVH       103 k
 libvirt-daemon-driver-nodedev  x86_64 1.1.1-12.el7           RHEVH        90 k
 libvirt-daemon-driver-nwfilter x86_64 1.1.1-12.el7           RHEVH       116 k
 libvirt-daemon-driver-secret   x86_64 1.1.1-12.el7           RHEVH        85 k
 libvirt-daemon-driver-storage  x86_64 1.1.1-12.el7           RHEVH       126 k
 netcf-libs                     x86_64 0.2.3-4.el7            RHEL-Server  64 k
 nfs-utils                      x86_64 1:1.2.9-0.3.el7        RHEVH       351 k
 nmap-ncat                      x86_64 2:6.40-2.el7           RHEVH       197 k
 numad                          x86_64 0.5-10.20121130git.el7 RHEL-Server  27 k
 pm-utils                       x86_64 1.4.1-24.el7           RHEVH       138 k
 qemu-img                       x86_64 10:1.5.3-19.el7        RHEVH       513 k
 quota                          x86_64 1:4.01-9.el7           RHEVH       173 k
 quota-nls                      noarch 1:4.01-9.el7           RHEVH        89 k
 radvd                          x86_64 1.9.2-3.el7            RHEL-Server  84 k
 rpcbind                        x86_64 0.2.0-21.el7           RHEL-Server  54 k
 rsyslog-mmjsonparse            x86_64 7.4.2-4.el7            RHEVH        23 k
 tcp_wrappers                   x86_64 7.6-75.el7             RHEVH        77 k
 unbound-libs                   x86_64 1.4.20-17.el7          RHEVH       292 k
 yajl                           x86_64 2.0.4-2.el7            RHEL-Server  37 k
Updating for dependencies:
 cyrus-sasl-lib                 x86_64 2.1.26-13.el7          RHEVH       151 k

Transaction Summary
================================================================================
Install  1 Package  (+41 Dependent packages)
Upgrade             (  1 Dependent package)

Total download size: 9.9 M


Much smaller than before , so set it Verfied

Comment 8 Ludek Smid 2014-06-13 09:45:12 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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