Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 831049 - Update libvirtd manpage to describe how --timeout works & its usage limitations
Update libvirtd manpage to describe how --timeout works & its usage limitations
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.3
Unspecified Linux
medium Severity medium
: rc
: ---
Assigned To: Gunannan Ren
Virtualization Bugs
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-12 01:26 EDT by yanbing du
Modified: 2013-02-21 02:17 EST (History)
8 users (show)

See Also:
Fixed In Version: libvirt-0.10.0-0rc0.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 02:17:00 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 16:18:26 EST

  None (edit)
Description yanbing du 2012-06-12 01:26:30 EDT
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 Berrange 2012-06-12 05:30:27 EDT
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 06:43:16 EDT
(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 11:21:03 EDT
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 08:06:32 EDT
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 08:45:57 EDT
patch sent to upstream
https://www.redhat.com/archives/libvir-list/2012-July/msg01393.html
Comment 6 Gunannan Ren 2012-07-30 05:40:38 EDT
commit a077c562f60aa42cb9a665f5f596bb1d2cae2550
Author: Guannan Ren <gren@redhat.com>
Date:   Thu Jul 26 00:22:53 2012 +0800

    doc: add more description on libvirtd option timeout
Comment 8 yanbing du 2012-08-03 01:33:37 EDT
(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 02:17:00 EST
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.