Red Hat Bugzilla – Bug 1011981
`service libvirt-guests status` may return 0 even if stopped
Last modified: 2013-11-21 04:11:13 EST
+++ This bug was initially created as a clone of Bug #1010693 +++ Description of problem: When starting vdsmd service, the service ask for authentication name and password and passwords and then wait for ever for input. Version-Release number of selected component (if applicable): host: RHEL 6.4 libvirt: 0.10.2-18.el6_4.14.x86_64 vdsm: 1b9acee00ff12d How reproducible: Always Steps to Reproduce: 1. Install vdsm 4.12.1 from ovirt stable repository http://resources.ovirt.org/releases/stable/rpm/EL/6/x86_64/ 2. Start few vms from ovirt engine 3. yum remove vdsm* 4. Build vdsm from source and perfom basic installation cd ~/rpmbuild/RPMS yum install --enablerepo=ovirt-beta x86_64/* noarch/vdsm-xml* noarch/vdsm-cli* 5. service vdsmd stop 6. service vdsmd start (vdsm fail to connect to libvirt) 7. service vdsmd stop 8. service vdsmd start (some warnings) 9. service vdsmd stop 10. service vdsmd start Actual results: vdsm ask for password and wait for input Expected results: start without waiting for input Additional info: The "Please enter authentiction name" messages comes from libvirt. We get the same message when running "virsh list". From this point vdsmd always ask for password when starting the service. .... [root@dhcp-2-233 RPMS]# service vdsmd start Can't connect to default. Skipping. libvirtd start/running, process 12872 vdsm: Running run_init_hooks vdsm: Running gencerts vdsm: Running reconfigure_sanlock vdsm: Running reconfigure_libvirt libvirt is already configured for vdsm vdsm: Running syslog_available vdsm: Running nwfilter libvir: Network Filter Driver error : Requested operation is not valid: nwfilter is in use vdsm: Running dummybr vdsm: Running load_needed_modules vdsm: Running tune_system vdsm: Running mkdirs vdsm: Running test_space vdsm: Running test_lo vdsm: Running test_conflicting_conf SUCCESS: ssl configured to true. No conflicts Starting up vdsm daemon: vdsm start [ OK ] [root@dhcp-2-233 RPMS]# service vdsmd stop Shutting down vdsm daemon: vdsm watchdog stop [ OK ] vdsm: Running run_final_hooks [ OK ] vdsm stop [ OK ] [root@dhcp-2-233 RPMS]# service vdsmd start Please enter your authentication name: Please enter your password: --- Additional comment from Nir Soffer on 2013-09-22 17:19:40 IST --- Entering empty password, vdsmd service starts: ... Please enter your authentication name: Please enter your password: Can't connect to default. Skipping. initctl: Job is already running: libvirtd vdsm: Running run_init_hooks vdsm: Running gencerts vdsm: Running reconfigure_sanlock vdsm: Running reconfigure_libvirt libvirt is already configured for vdsm vdsm: Running syslog_available vdsm: Running nwfilter libvir: Network Filter Driver error : Requested operation is not valid: nwfilter is in use vdsm: Running dummybr vdsm: Running load_needed_modules vdsm: Running tune_system vdsm: Running mkdirs vdsm: Running test_space vdsm: Running test_lo vdsm: Running test_conflicting_conf SUCCESS: ssl configured to true. No conflicts Starting up vdsm daemon: vdsm start [ OK ] From the engine side, the host seems to function correctly. The vms can be stopped and started again. --- Additional comment from Dan Kenigsberg on 2013-09-25 15:35:01 IST --- The problem is real, due to # service libvirt-guests status; echo $? stopped, with no saved guests 0 returning a wrong $? == 0 even when it is stopped (should be 3) The issue is solved in upstream libvirt by virtue of commit 9c51de2b4e2158b93adab4467293b35626099ff6 Author: Ján Tomko <jtomko@redhat.com> Date: Tue Apr 30 13:44:33 2013 +0200 libvirt-guests: status: return non-zero when stopped Note: the issue is hidden if somehow there were saved guests such as in # service libvirt-guests status; echo $? stopped, with saved guests 3
*** Bug 957779 has been marked as a duplicate of this bug. ***
I can reproduce this bug with libvirt-0.10.2-27.el6.x86_64, but can not reproduce it with libvirt-0.10.2-28.el6.x86_64 Reproducing: [root@hp-dl385g7-01 ~]# virsh list --all Id Name State ---------------------------------------------------- 6 r6 running - rhel6 shut off [root@hp-dl385g7-01 ~]# virsh destroy r6 Domain r6 destroyed [root@hp-dl385g7-01 ~]# service libvirt-guests status started [root@hp-dl385g7-01 ~]# service libvirt-guests stop Running guests on default URI: no running guests. [root@hp-dl385g7-01 ~]# service libvirt-guests status stopped, with no saved guests [root@hp-dl385g7-01 ~]# echo $? 0 [root@hp-dl385g7-01 ~]# Verifing: [root@hp-dl385g7-01 ~]# virsh list --all Id Name State ---------------------------------------------------- - r6 shut off - rhel6 shut off [root@hp-dl385g7-01 ~]# service libvirt-guests start [root@hp-dl385g7-01 ~]# service libvirt-guests status started [root@hp-dl385g7-01 ~]# service libvirt-guests stop Running guests on default URI: no running guests. [root@hp-dl385g7-01 ~]# service libvirt-guests status stopped, with no saved guests [root@hp-dl385g7-01 ~]# echo $? 3 [root@hp-dl385g7-01 ~]#
Changed to verified according to comment 4.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1581.html