Bug 714903 - rhnreg_ks exits with 1 when rhn-virtualization-host installed and libvirtd not running
Summary: rhnreg_ks exits with 1 when rhn-virtualization-host installed and libvirtd no...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rhn-client-tools
Version: 5.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Tomas Lestach
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: 761489 839776 839791
TreeView+ depends on / blocked
 
Reported: 2011-06-21 09:13 UTC by Jan Hutař
Modified: 2012-07-12 20:35 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 761489 (view as bug list)
Environment:
Last Closed: 2011-10-10 12:28:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.


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