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 827380 - Minimum value for nodesuspend time duration need be given in virsh manual or help
Summary: Minimum value for nodesuspend time duration need be given in virsh manual or ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Gunannan Ren
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-01 10:06 UTC by tingting zheng
Modified: 2013-02-21 07:16 UTC (History)
7 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:16:02 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 tingting zheng 2012-06-01 10:06:22 UTC
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 13:19:38 UTC
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 09:02:46 UTC
patch sent to upstream
https://www.redhat.com/archives/libvir-list/2012-July/msg00887.html

Comment 5 Gunannan Ren 2012-07-30 09:41:40 UTC
commit 7aea9b8cf7808d0fe77b5c9323be8f879bc2f1e6
Author: Guannan Ren <gren>
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 07:05:19 UTC
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 07:16:02 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.