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.
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.