Bug 714903

Summary: rhnreg_ks exits with 1 when rhn-virtualization-host installed and libvirtd not running
Product: Red Hat Enterprise Linux 5 Reporter: Jan Hutař <jhutar>
Component: rhn-client-toolsAssignee: Tomas Lestach <tlestach>
Status: CLOSED NOTABUG QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.7CC: tlestach
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 761489 (view as bug list) Environment:
Last Closed: 2011-10-10 12:28:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 761489, 839776, 839791    

Description Jan Hutař 2011-06-21 09:13:16 UTC
Description of problem:
rhnreg_ks exits with 1 when rhn-virtualization-host package is installed and libvirtd is not running. In came situation, rhn-profile-sync exits with 0.


Version-Release number of selected component (if applicable):
rhn-virtualization-host-5.4.14-4.el5sat
rhn-client-tools-0.4.20-56.el5


How reproducible:
always


Steps to Reproduce:
1. Install rhn-virtualization-host
2. # service libvirtd stop
3. # rhnreg_ks ...


Actual results:
# rhnreg_ks --force --username=<username> --password=<password>
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
# echo $?
1
# rhn-profile-sync 
Updating package profile...
Updating hardware profile...
Updating virtualization profile...
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
# echo $?
0


Expected results:
Exit code should be 0, as registration utility registered the system. Or maybe exit code of rhn-profile-sync should be 1.

Comment 3 Tomas Lestach 2011-10-10 12:28:54 UTC
Hey Jan,

after some discussions we've decided this behavior is expected.

Main purpose of rhnreg_ks is to register the system and to get systemid file. If virtualization profile didn't get updated, what is a side action, it is not fatal (exit code: 0) and is notified by the warning message.

rhn-profile-sync's purpose on the other side is to update package, hardware and virtualization profile. If one of these parts fail, we need to nofity it (exit code:1).

Closing as NOTABUG.