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 831049 - Update libvirtd manpage to describe how --timeout works & its usage limitations
Summary: Update libvirtd manpage to describe how --timeout works & its usage limitations
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Gunannan Ren
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-12 05:26 UTC by yanbing du
Modified: 2013-02-21 07:17 UTC (History)
8 users (show)

Fixed In Version: libvirt-0.10.0-0rc0.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 07:17:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 21:18:26 UTC

Description yanbing du 2012-06-12 05:26:30 UTC
Description of problem:
For now, when we run libvirtd by root user in the foreground, the timeout option can not come into force if there are some active objects, such as running guests, active pools or virtual networks. In fact, both 'default' pool and 'default' net are autostart, so unless we set autostart=false for them, they will always start when run libvirtd in the foregroud, then timeout option will never work.
So we need to get rid of the impractical design.

Version-Release number of selected component (if applicable):
libvirt-0.9.10-21.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Stop all started guests, pools and networks. And don't change the autostart flag for pools and networks.
2. #service libvirtd stop
3. #libvirtd -t 2

  
Actual results:
Step3, libvirtd can not exit after 2 seconds.

Expected results:
get rid of the impractical design for libvirtd timeout option.

Additional info:

Comment 1 Daniel Berrangé 2012-06-12 09:30:27 UTC
This is working entirely as designed. The timeout option is *supposed* to take account of any running resources, so if you autostart things, it will not shutdown. The timeout option is primarily intended for use with the non-privileged libvirtd when it has been auto-spawned by a client app.

Comment 2 yanbing du 2012-06-12 10:43:16 UTC
(In reply to comment #1)
> This is working entirely as designed. The timeout option is *supposed* to
> take account of any running resources, so if you autostart things, it will
> not shutdown. The timeout option is primarily intended for use with the
> non-privileged libvirtd when it has been auto-spawned by a client app.

Thanks, i see.
So, if we need update the man page to give a detail explanation for timeout option?
For now:
#man libvirtd
<snip>
-t, --timeout SECONDS
           Exit after timeout period (in seconds) expires.
</snip>

Comment 3 Dave Allan 2012-06-12 15:21:03 UTC
I agree with Dan that the behavior is correct as designed.  It does however seem that confusion arises pretty much every time someone tries to use this feature, so perhaps some additional documentation in the manpage will help clarify things.  I'm reopening to track the manpage addition.

Comment 4 Gunannan Ren 2012-07-25 12:06:32 UTC
how to test it:
1 start libvirtd 
   /usr/sbin/libvirtd --timeout=2
2 check registered drivers, ensure no active resouces.
  virsh net-list --all
  virsh pool-list --all
  virsh nwfilter-list
  virsh -c qemu:///system list --all
  virsh -c lxc:/// list --all
  virsh -c uml:///system list --all
 
for these registered drivers: network, storage, nwfilter, qemu, lxc, uml, libxl

3, When all active resource, for example, domain is shutdown, the libvirtd will stop automatically.

Comment 5 Gunannan Ren 2012-07-25 12:45:57 UTC
patch sent to upstream
https://www.redhat.com/archives/libvir-list/2012-July/msg01393.html

Comment 6 Gunannan Ren 2012-07-30 09:40:38 UTC
commit a077c562f60aa42cb9a665f5f596bb1d2cae2550
Author: Guannan Ren <gren>
Date:   Thu Jul 26 00:22:53 2012 +0800

    doc: add more description on libvirtd option timeout

Comment 8 yanbing du 2012-08-03 05:33:37 UTC
(In reply to comment #4)
> how to test it:
> 1 start libvirtd 
>    /usr/sbin/libvirtd --timeout=2
> 2 check registered drivers, ensure no active resouces.
>   virsh net-list --all
>   virsh pool-list --all
>   virsh nwfilter-list
>   virsh -c qemu:///system list --all
>   virsh -c lxc:/// list --all
>   virsh -c uml:///system list --all
>  
> for these registered drivers: network, storage, nwfilter, qemu, lxc, uml,
> libxl
> 
> 3, When all active resource, for example, domain is shutdown, the libvirtd
> will stop automatically.

This test already passed before, and check the manpage of libvirtd, can find more description on libvirtd option timeout

For libvirt-0.9.13-3.el6.x86_64
#man libvirtd
------
       -t, --timeout SECONDS
           Exit after timeout period (in seconds) expires.
------

For libvirt-0.10.0-0rc0.el6.x86_64
#man libvirtd
------
       -t, --timeout SECONDS
           Exit after timeout period (in seconds) elapse with no client connections or registered resources.  Be aware that resources such as autostart networks will result in never reaching the timeout, even when there are no client connections.
------

So move this bug to verify.

Comment 9 errata-xmlrpc 2013-02-21 07:17:00 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/RHSA-2013-0276.html


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