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 869508 - the option --flags of virsh nodesuspend command should be removed
Summary: the option --flags of virsh nodesuspend command should be removed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-24 06:33 UTC by EricLee
Modified: 2013-02-21 07:10 UTC (History)
9 users (show)

Fixed In Version: libvirt-0.10.2-6.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 07:10:56 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 EricLee 2012-10-24 06:33:01 UTC
Description
the option [--flags] of virsh nodesuspend command should give more explanation in manual

version
# rpm -qa libvirt qemu-kvm-rhev; uname -r
libvirt-0.10.2-4.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.317.el6.x86_64
2.6.32-330.el6.x86_64

reproduce
100%

Steps
1. # 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
    --flags <number>  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. The duration time should be at least 60
           seconds.
.....

There is no more explanation for "--flags", for example, if other values except 0 work, or how does it work, what's the different between giving or not?

And there is no info for this in libvirt.org.

Actual result
As steps

Expect result
Give more explanation for it, for example, if other values except 0 work, or how does it work, what's the different between giving or not?

Comment 2 Dave Allan 2012-10-24 13:44:28 UTC
After discussion with Jiri and Eric on irc, consensus is that the flags option should be removed and replaced with human understandable options for any applicable flags.  Jiri, Eric, any thoughts?

Comment 3 Eric Blake 2012-10-24 13:48:08 UTC
In the current code base, there ARE no flags - the only thing you can pass that does not cause failure is '--flags 0', but that's the default.  The addition of the --flags argument in virsh was a mistake, and removing it makes sense.

Comment 4 Jiri Denemark 2012-10-26 11:52:53 UTC
Fixed upstream by v1.0.0-rc1-17-gab54581:

commit ab54581549667af43b2bef493c696633d46031ff
Author: Jiri Denemark <jdenemar>
Date:   Thu Oct 25 10:14:38 2012 +0200

    virsh: Remove --flags from nodesuspend
    
    We always expose individual bits from flags as separate options rather
    than exposing a raw flags options. Since virNodeSuspendForDuration does
    not currently support any flags, the only way of using this --flags
    options that would not fail is "--flags 0", which is equivalent to
    omitting the option. Thus it is highly unlikely anyone would actually be
    using it and removing it should be safe.

Comment 6 yuping zhang 2012-10-30 05:52:57 UTC
Verified this issue with libvirt-0.10.2-6.el6.x86_64.

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

  SYNOPSIS
    nodesuspend <target> <duration>

  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

#man virsh
....
 nodesuspend [target] [duration]
           Puts the node (host machine) into a system-wide sleep state such as Suspend-to-RAM,
           Suspend-to-Disk or Hybrid-Suspend 
...

# virsh nodesuspend --target mem 61 --flags 0
error: command 'nodesuspend' doesn't support option --flags

Comment 8 yuping zhang 2012-10-30 07:20:33 UTC
Change the bug status to VERIFIED as comment 6.

Comment 9 errata-xmlrpc 2013-02-21 07:10:56 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.