Bug 738725

Summary: installing libvirt issues warnings due to outdated spec file %postinstalls
Product: [Fedora] Fedora Reporter: Eric Blake <eblake>
Component: libvirtAssignee: Eric Blake <eblake>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: berrange, clalance, crobinso, dougsland, itamar, jforbes, laine, veillard, virt-maint, zhoutaomtv
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-0.9.6-4.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 741358 (view as bug list) Environment:
Last Closed: 2012-01-05 15:59:50 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 741358    
Attachments:
Description Flags
Screenshot with problem none

Description Eric Blake 2011-09-15 12:44:27 EDT
Description of problem:
The %postinstall of libvirt-client was written in F14, and never updated to F15/F16 systemd days.  Therefore, it is calling old command lines, which issue some scary-looking noise during the course of installation via yum.  Meanwhile, the libvirt package %postinstall issues a failure message about cgconfig, now that cgroups are managed differently.

Version-Release number of selected component (if applicable):
libvirt-client-0.9.4-1.fc16.x86_64

How reproducible:
100%

Steps to Reproduce:
1. yum install libvirt-client
2.
3.
  
Actual results:
  Installing : libvirt-client-0.9.4-1.fc16.x86_64                         14/15 

Note: This output shows SysV services only and does not include native
      systemd services. SysV configuration data might be overridden by native
      systemd configuration.

  Installing : libvirt-0.9.4-1.fc16.x86_64                                15/15 
error reading information on service cgconfig: No such file or directory


Expected results:
These two packages should successfully install without leaking either message.

Additional info:
Found during virt test day
https://fedoraproject.org/wiki/Test_Day:2011-09-15_Virtualization
Comment 1 Eric Blake 2011-09-16 18:45:57 EDT
Upstream patch proposed:
https://www.redhat.com/archives/libvir-list/2011-September/msg00682.html
Comment 2 Eric Blake 2011-09-21 14:00:51 EDT
0.9.5 now includes this, which needs to be backported to F15:

commit ecd8725c1ad001fdd11f6c680ef0c20421e65a9b
Author: Eric Blake <eblake@redhat.com>
Date:   Fri Sep 16 16:40:25 2011 -0600

    spec: silence warnings when installing in F16
    
    https://bugzilla.redhat.com/show_bug.cgi?id=738725 documents that
    'yum install libvirt' in Fedora 16 is rather noisy.  This fixes
    the problems.
    
    * libvirt.spec.in (%post client): Silence chkconfig warning about
    SysV services.
    (%post) [with_cgconfig]: Drop for Fedora 15 and newer, where
    systemd does this automatically.
Comment 3 Fedora Update System 2011-09-22 10:21:17 EDT
libvirt-0.9.6-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/libvirt-0.9.6-1.fc16
Comment 4 Fedora Admin XMLRPC Client 2011-09-22 13:51:49 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 5 Fedora Admin XMLRPC Client 2011-09-22 13:54:30 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 6 Fedora Update System 2011-09-24 16:46:26 EDT
Package libvirt-0.9.6-1.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libvirt-0.9.6-1.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/libvirt-0.9.6-1.fc16
then log in and leave karma (feedback).
Comment 7 Eric Blake 2011-09-26 16:32:05 EDT
Moving back to POST - F16 needs to include this patch for virt-preview to work in F15 (otherwise, virt-preview will fail to set up cgroups, since F15 does not benefit from systemd doing it automatically):

https://www.redhat.com/archives/libvir-list/2011-September/msg00997.html
Comment 8 Fedora Update System 2011-10-03 12:06:47 EDT
libvirt-0.9.6-2.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/libvirt-0.9.6-2.fc16
Comment 9 Fedora Update System 2011-10-03 13:45:10 EDT
Package libvirt-0.9.6-2.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libvirt-0.9.6-2.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/libvirt-0.9.6-2.fc16
then log in and leave karma (feedback).
Comment 10 Fedora Update System 2011-10-09 15:50:47 EDT
libvirt-0.9.6-2.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 11 zhoutaomtv 2011-11-14 00:42:18 EST
The issue is still exist under F16 stable version.
libvirt-0.9.6-2.fc16 still show the same warning message.
Comment 12 zhoutaomtv 2011-11-14 00:43:46 EST
(In reply to comment #10)
> libvirt-0.9.6-2.fc16 has been pushed to the Fedora 16 stable repository.  If
> problems still persist, please make note of it in this bug report.

Could u check it again on F16.
Comment 13 Alexei Panov 2011-12-08 14:20:15 EST
Created attachment 542707 [details]
Screenshot with problem

Problem have still persist. See screenshot.
Comment 14 Eric Blake 2011-12-08 14:42:04 EST
Reopening.  There have been some more spec patches upstream in the meantime; I'll see if any of them fix the issue, or if there is yet another upstream patch needed.
Comment 15 Eric Blake 2011-12-08 15:43:45 EST
Found the bug.

https://www.redhat.com/archives/libvir-list/2011-December/msg00418.html

Commit ecd8725 tried to silence a spurious warning on the initial
libvirt install, and commit ba6cbb1 tried to fix up the logic to the
correct Fedora version, but the warning was still present due to a
logic bug: since %{fedora} and %{rhel} are never simulatanously
set, then 0%{rhel} <= 6 made the %if always true.  Checking for
minimum versions (via >=) is okay, but checking for maximum versions
(via <=) requires a prerequisite test that the platform being tested
is non-zero.

Also fix a bogus setting of with_libxl (although we previously
hard-code with_libxl to 0 for rhel earlier in the file, so this
was not as severe a bug).

* libvirt.spec.in (with_cgconfig): Don't enable cgconfig on F16.
---

How embarrassing that I've botched this patch twice; I didn't notice
the botch because 'yum reinstall libvirt' is not an initial install,
so it didn't trigger the scriptlet in question.  It took a full
'yum erase libvirt' followed by 'yum install libvirt' to prove this
patch (finally) gets it right.
Comment 16 Eric Blake 2011-12-08 17:04:12 EST
This needs backporting to F15 and F16.

commit 3b95f284f19d2e43daa32a87cd10eaf42ea8bb4e
Author: Eric Blake <eblake@redhat.com>
Date:   Thu Dec 8 13:32:37 2011 -0700

    spec: fix logic bug in deciding to turn on cgconfig
Comment 17 Fedora Update System 2011-12-19 21:08:59 EST
libvirt-0.9.6-4.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/libvirt-0.9.6-4.fc16
Comment 18 Laine Stump 2011-12-20 11:44:43 EST
Somehow this bz wasn't automatically moved from POST to MODIFIED, even though it did get the auto-notice in Comment 17. Manually moving to MODIFIED...
Comment 19 Fedora Update System 2011-12-22 17:35:05 EST
Package libvirt-0.9.6-4.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libvirt-0.9.6-4.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-17267/libvirt-0.9.6-4.fc16
then log in and leave karma (feedback).
Comment 20 Fedora Update System 2012-01-05 15:59:50 EST
libvirt-0.9.6-4.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.