RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1011981 - `service libvirt-guests status` may return 0 even if stopped
Summary: `service libvirt-guests status` may return 0 even if stopped
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Virtualization Bugs
URL:
Whiteboard: infra
: 957779 (view as bug list)
Depends On:
Blocks: 1010693 1017196
TreeView+ depends on / blocked
 
Reported: 2013-09-25 13:39 UTC by Dan Kenigsberg
Modified: 2018-12-04 15:55 UTC (History)
18 users (show)

Fixed In Version: libvirt-0.10.2-28.el6
Doc Type: Bug Fix
Doc Text:
Whereas the status command of libvirt-guests init script returned "0" value when libvirt-guests service was stopped, LSB (Linux Standard Base) required a different value ("3") in such case. Consequently, other scripts relying on the return value could not distinguish whether the service was running or not. The libvirt-guests script has been fixed to conform with LSB and the "service libvirt-guests status" command now returns the correct value in the described scenario.
Clone Of: 1010693
Environment:
Last Closed: 2013-11-21 09:11:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1581 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2013-11-21 01:11:35 UTC

Description Dan Kenigsberg 2013-09-25 13:39:42 UTC
+++ 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>
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

Comment 2 Jiri Denemark 2013-09-30 13:13:48 UTC
*** Bug 957779 has been marked as a duplicate of this bug. ***

Comment 4 Hu Jianwei 2013-10-08 10:08:35 UTC
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 ~]#

Comment 8 Hu Jianwei 2013-10-09 10:10:15 UTC
Changed to verified according to comment 4.

Comment 11 errata-xmlrpc 2013-11-21 09:11:13 UTC
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


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