Bug 657516 - rhnreg_ks fails when libvirtd daemon is stoped.
rhnreg_ks fails when libvirtd daemon is stoped.
Status: CLOSED ERRATA
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Virtualization (Show other bugs)
540
All Linux
high Severity high
: ---
: ---
Assigned To: Miroslav Suchý
Jiri Kastner
:
Depends On:
Blocks: sat54-errata
  Show dependency treegraph
 
Reported: 2010-11-26 05:28 EST by Dimitar Yordanov
Modified: 2013-03-09 22:14 EST (History)
9 users (show)

See Also:
Fixed In Version: rhn-virtualization-5.4.14-3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-03-07 04:24:01 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
rpm pkg List (27.44 KB, text/plain)
2010-11-26 05:31 EST, Dimitar Yordanov
no flags Details

  None (edit)
Description Dimitar Yordanov 2010-11-26 05:28:28 EST
Description of problem:
rhnreg_ks fails when libvirtd daemon is stoped.

Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux Server release 5.6 Beta (Tikanga)

# rpm -qf `which rhnreg_ks`
rhn-setup-0.4.20-45.el5

# rpm -qa | grep -i virt
libvirt-python-0.8.2-11.el5
libvirt-0.8.2-11.el5
rhn-virtualization-host-5.4.14-1.el5sat
rhn-virtualization-common-5.4.14-1.el5sat

# rpm -qa | grep -i xen
xen-libs-3.0.3-117.el5

# rpm -qa | grep -i kvm
etherboot-zroms-kvm-5.4.4-13.el5
kvm-83-207.el5
kmod-kvm-83-207.el5

# rpm -qa | grep rhnlib
rhnlib-2.5.22-5.el5

 
How reproducible:
Non deterministic.
On 4 machines the problem was encountered (ia64, i386,x86_64,s390).
It high probability the problems is related to some package combination related to libvirt.

Steps to Reproduce:
1.service libvirtd stop
2.rhnreg_ks --user=some --password=some --server=http://x.redhat.com --profilename=some

  
Actual results:
libvir: Remote error : unable to connect to '/var/run/libvirt/libvirt-sock', libvirtd may need to be started: No such file or directory
An error has occurred:
libvirt.libvirtError
See /var/log/up2date for more information

#tail -n 10 /var/log/up2date
Traceback (most recent call last):
  File "/usr/sbin/rhnreg_ks", line 216, in ?
    cli.run()
  File "/usr/share/rhn/up2date_client/rhncli.py", line 65, in run
    sys.exit(self.main() or 0)
  File "/usr/sbin/rhnreg_ks", line 178, in main
    rhnreg.sendVirtInfo(systemId)
  File "/usr/share/rhn/up2date_client/rhnreg.py", line 642, in sendVirtInfo
    support.refresh()
  File "/usr/share/rhn/virtualization/support.py", line 72, in refresh
    if _is_host_domain():
  File "/usr/share/rhn/virtualization/support.py", line 197, in _is_host_domain
    conn = libvirt.open(None)
  File "/usr/lib64/python2.4/site-packages/libvirt.py", line 169, in open
    if ret is None:raise libvirtError('virConnectOpen() failed')
libvirt.libvirtError: unable to connect to '/var/run/libvirt/libvirt-sock', libvirtd may need to be started: No such file or directory


Expected results:
The system is registered to Satellite

Additional info:
Comment 1 Dimitar Yordanov 2010-11-26 05:31:36 EST
Created attachment 463055 [details]
rpm pkg List
Comment 7 Miroslav Suchý 2010-12-20 10:36:47 EST
taking
Comment 8 Miroslav Suchý 2010-12-20 11:41:03 EST
Already fixed in Spacewalk commit 20e7e7e2a140226f8b6faade06a85d1c6290dc8d (hey, that was me several weeks ago!)
I polished it little bit in commit 6be499e8c84d0c514dd6168648836732e026fdad
rhnreg_ks (and pooler from cronjob) should now write:
Warning: Could not retrieve virtualization information!
        libvirtd service needs to be running.
and proceed further.
Comment 10 Miroslav Suchý 2011-01-06 09:02:53 EST
cherrypicked to satellite.git as
eb69bfab874ac0d8c80558b9e1163c4569743911
1c7db81647d10aaf7843ff31ee28023292fe7674
Comment 12 Miroslav Suchý 2011-01-18 03:48:39 EST
Karel are you trying it with packages from RHBA-2011:10442-01 or with older? If it is older,then yes, it is duplicate.
Comment 13 Karel Volný 2011-01-18 05:41:06 EST
(In reply to comment #12)
> Karel are you trying it with packages from RHBA-2011:10442-01 or with older?
> If it is older,then yes, it is duplicate.

.live.[root@i386-6c-m1 ~]# rpm -qf /usr/share/rhn/virtualization/support.py
rhn-virtualization-host-5.4.14-1.el6sat.noarch

and the erratum has
rhn-virtualization-5.4.14-2.el6sat

so yes, there is the older version installed

thanks for the information
Comment 15 Miroslav Suchý 2011-01-24 08:18:31 EST
Fixed in commit 3dc02410628febd98fc37df5de0257397ac5e288
Comment 16 Jiri Kastner 2011-01-24 09:47:49 EST
RHEL5:
[root@amd-toonie2-01 ~]# rhnreg_ks --serverUrl=https://test11-64.rhndev.redhat.com/XMLRPC --sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT.test11-64 --username=admin --password=dog8NOcode --force
libvir: Remote error : unable to connect to '/var/run/libvirt/libvirt-sock', libvirtd may need to be started: No such file or directory
Warning: Could not retrieve virtualization information!
	libvirtd service needs to be running.
[root@amd-toonie2-01 ~]# rpm -qa rhn-virtualization\*
rhn-virtualization-common-5.4.14-3.el5sat
rhn-virtualization-host-5.4.14-3.el5sat

RHEL6:
[root@amd-tilapia-01 ~]# rhnreg_ks --serverUrl=https://test11-64.rhndev.redhat.com/XMLRPC --sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT.test11-64 --username=admin --password=dog8NOcode --force
libvir: Remote error : unable to connect to '/var/run/libvirt/libvirt-sock', libvirtd may need to be started: No such file or directory
Warning: Could not retrieve virtualization information!
	libvirtd service needs to be running.
You have new mail in /var/spool/mail/root
[root@amd-tilapia-01 ~]# rpm -qa rhn-virtualization\*
rhn-virtualization-host-5.4.14-3.el6sat.noarch
rhn-virtualization-common-5.4.14-3.el6sat.noarch
Comment 17 Steven Ellis 2011-02-10 22:15:45 EST
I appear to have a similar problem with a RHEL 5.6 based KVM hypervisor I'm using as a RHEV host

rpm -qa rhn-virtualization\*
rhn-virtualization-host-5.4.14-1.el5sat
rhn-virtualization-common-5.4.14-1.el5sat



rhn-virtualization-common-5.4.14-1.el5sat
[root@virt-2 ~]#  rhn-profile-sync 
Updating package profile...
Updating hardware profile...
Updating virtualization profile...
An error has occurred:
exceptions.AttributeError
See /var/log/up2date for more information


from /var/log/up2date

[Fri Feb 11 16:14:02 2011] up2date updateLoginInfo() login info
[Fri Feb 11 16:14:02 2011] up2date logging into up2date server
[Fri Feb 11 16:14:02 2011] up2date successfully retrieved authentication token from up2date server
[Fri Feb 11 16:14:02 2011] up2date Updating package profile
[Fri Feb 11 16:14:04 2011] up2date 
Traceback (most recent call last):
  File "/usr/sbin/rhn-profile-sync", line 54, in ?
    cli.run()
  File "/usr/share/rhn/up2date_client/rhncli.py", line 65, in run
    sys.exit(self.main() or 0)
  File "/usr/sbin/rhn-profile-sync", line 49, in main
    support.refresh()
  File "/usr/share/rhn/virtualization/support.py", line 101, in refresh
    domain_list = domains.values()
exceptions.AttributeError: 'NoneType' object has no attribute 'values'
Comment 18 Steven Ellis 2011-02-10 23:07:52 EST
Work around for older version of packages required enabling libvirtd while I register the system

# Enable libvirtd
service libvirtd start

# Update our RHN Satellite profile.
rhn-profile-sync -vvv

# Make sure libvirtd doesn't start on boot and break the RHEV support.
service libvirtd stop
chkconfig libvirtd off
Comment 19 errata-xmlrpc 2011-03-07 04:24:01 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0323.html

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