Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 827380 - Minimum value for nodesuspend time duration need be given in virsh manual or help
Minimum value for nodesuspend time duration need be given in virsh manual or ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.3
Unspecified Unspecified
low Severity low
: rc
: ---
Assigned To: Gunannan Ren
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-01 06:06 EDT by tingting zheng
Modified: 2013-02-21 02:16 EST (History)
7 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:16:02 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 tingting zheng 2012-06-01 06:06:22 EDT
escription of problem:
Minimum value for nodesuspend time duration need be given in virsh manual or help

Version-Release number of selected component (if applicable):
libvirt-0.9.10-21.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.295.el6.x86_64


How reproducible:
100%

Steps to Reproduce:
1.# virsh help nodesuspend
  NAME
    nodesuspend - suspend the host node for a given time duration

  SYNOPSIS
    nodesuspend   [--flags ]

  DESCRIPTION
    Suspend the host node for a given time duration and attempt to resume thereafter.

  OPTIONS
    [--target]   mem(Suspend-to-RAM), disk(Suspend-to-Disk), hybrid(Hybrid-Suspend)
    [--duration]   Suspend duration in seconds
    --flags   Suspend flags, 0 for default


2. # man virsh
……
       nodesuspend [target] [duration] [flags]
           Puts the node (host machine) into a system-wide sleep state such as Suspend-to-RAM,
           Suspend-to-Disk or Hybrid-Suspend and sets up a Real-Time-Clock interrupt to fire (to wake
           up the node) after a time delay specified by the ’duration’ parameter.
……

3.Use virsh nodesuspend to test:
# virsh nodesuspend mem 20
error: The host was not suspended
error: invalid argument: Suspend duration is too short

# virsh nodesuspend mem 60
error: The host was not suspended
error: invalid argument: Suspend duration is too short

When the time  duration is larger than 60,it can execute the command.
# virsh nodesuspend mem 61

Checked libvirtd.log :
2012-06-01 08:02:49.880+0000: 1860: error : virNodeSuspendSetNodeWakeup:99 : invalid argument: Suspend duration is too short
2012-06-01 08:02:55.384+0000: 1858: error : virNodeSuspendSetNodeWakeup:99 : invalid argument: Suspend duration is too short

Actual results:
Minimum value for nodesuspend time duration is not given in virsh manual or help

Expected results:
Minimum value for nodesuspend time duration need be given in virsh manual or help

Additional info:
Comment 3 Gunannan Ren 2012-07-18 09:19:38 EDT
yes, the duration needs to be more than 60 seconds.

src/util/virnodesuspend.c

#define MIN_TIME_REQ_FOR_SUSPEND 60 /* in seconds */

...

    if (alarmTime <= MIN_TIME_REQ_FOR_SUSPEND) {
        virNodeSuspendError(VIR_ERR_INVALID_ARG, "%s", _("Suspend duration is too short"));
        return -1;
    }
Comment 4 Gunannan Ren 2012-07-19 05:02:46 EDT
patch sent to upstream
https://www.redhat.com/archives/libvir-list/2012-July/msg00887.html
Comment 5 Gunannan Ren 2012-07-30 05:41:40 EDT
commit 7aea9b8cf7808d0fe77b5c9323be8f879bc2f1e6
Author: Guannan Ren <gren@redhat.com>
Date:   Wed Jul 25 13:52:49 2012 +0800

    util: set minimum value of nodesuspend duration to 60 seconds
    
    Change the permissible minimum value of nodesuspend duration time
    to 60 seconds. If option is less than the value, reports error.
    Update virsh help and manpage the infomation.
Comment 7 yuping zhang 2012-08-06 03:05:19 EDT
Verified this issue with libvirt-0.10.0-0rc0.el6.x86_64.

# virsh help nodesuspend
  NAME
    nodesuspend - suspend the host node for a given time duration

  SYNOPSIS
    nodesuspend <target> <duration> [--flags <number>]

  DESCRIPTION
    Suspend the host node for a given time duration and attempt to resume thereafter.

  OPTIONS
    [--target] <string>  mem(Suspend-to-RAM), disk(Suspend-to-Disk), hybrid(Hybrid-Suspend)
    [--duration] <number>  Suspend duration in seconds, at least 60 <=====Added.
    --flags <number>  Suspend flags, 0 for default

#man virsh
        .....
       nodesuspend [target] [duration] [flags]
           Puts the node (host machine) into a system-wide sleep state
           such as Suspend-to-RAM, Suspend-to-Disk or Hybrid-Suspend
           and sets up a Real-Time-Clock interrupt to fire (to wake up
           the node) after a time delay specified by the ’duration’
           parameter. The duration time should be at least 60 seconds.

   ....

So change the bug status to VERIFIED.
Comment 8 errata-xmlrpc 2013-02-21 02:16:02 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.