Bug 956966

Summary: redundant command "nodedev-dettach" while running "virsh help nodedev"
Product: Red Hat Enterprise Linux 7 Reporter: Xuesong Zhang <xuzhang>
Component: libvirtAssignee: Eric Blake <eblake>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 7.0CC: acathrow, cwei, dyuan, eblake, mzhan, shyu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-1.0.5-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 956968 (view as bug list) Environment:
Last Closed: 2014-06-13 12:14:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 956968    

Description Xuesong Zhang 2013-04-26 06:12:17 UTC
Description of problem:
There is one redundant command "nodedev-dettach" while running "virsh help nodedev"

Version-Release number of selected component (if applicable):
libvirt-1.0.4-1.1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. It only show one "nodedev-detach" which run command "virsh help".
# virsh help|grep nodedev
 Node Device (help keyword 'nodedev'):
    nodedev-create                 create a device defined by an XML file on the node
    nodedev-destroy                destroy (stop) a device on the node
    nodedev-detach                 detach node device from its device driver
    nodedev-dumpxml                node device details in XML
    nodedev-list                   enumerate devices on this host
    nodedev-reattach               reattach node device to its device driver
    nodedev-reset                  reset node device

2. It will show both "nodedev-detach" and "nodedev-dettach" while running command "virsh help nodedev".
# virsh help nodedev
 Node Device (help keyword 'nodedev'):
    nodedev-create                 create a device defined by an XML file on the node
    nodedev-destroy                destroy (stop) a device on the node
    nodedev-detach                 detach node device from its device driver
    nodedev-dettach                detach node device from its device driver
    nodedev-dumpxml                node device details in XML
    nodedev-list                   enumerate devices on this host
    nodedev-reattach               reattach node device to its device driver
    nodedev-reset                  reset node device

  
Actual results:
there is noe redundant command "nodedev-dettach" in step2.

Expected results:
The redundant command "nodedev-dettach" should not be remove in step2

Additional info:
This issue also occurred in rhel6.

Comment 2 Eric Blake 2013-04-26 10:16:37 UTC
Hmm.  This means that the alias suppression code in 'virsh help' isn't properly kicking in when doing 'virsh help category'.  nodedev-dettach exists for backwards compatibility, but should never be advertized in any help output.

Comment 3 Eric Blake 2013-04-26 10:43:31 UTC
Upstream patch proposed:
https://www.redhat.com/archives/libvir-list/2013-April/msg01895.html

Comment 4 Eric Blake 2013-04-26 12:00:45 UTC
rebase will pick up:
commit 117dc4cc8a8993334e8ec512fde40e3f8916da69
Author: Eric Blake <eblake>
Date:   Fri Apr 26 04:20:29 2013 -0600

    virsh: suppress aliases in group help
    
    'virsh help | grep nodedev-det' shows only nodedev-detach, but
    'virsh help nodedev | grep nodedev-det' also shows the old alias
    nodedev-dettach that we intentionally hid in commit af3f9aab.
    
    See also commit 787f4fe and this bug report:
    https://bugzilla.redhat.com/show_bug.cgi?id=956966
    
    * tools/virsh.c (vshCmdGrpHelp): Copy suppression of vshCmdHelp.

Comment 5 Shanzhi Yu 2013-05-07 01:26:30 UTC
reproduce this bug with package libvirt-1.0.4-1.1.el7.x86_64
verify this bug with package libvirt-1.0.5-1.el7.x86_64
step:
# virsh help nodedev
 Node Device (help keyword 'nodedev'):
    nodedev-create                 create a device defined by an XML file on the node
    nodedev-destroy                destroy (stop) a device on the node
    nodedev-detach                 detach node device from its device driver
    nodedev-dumpxml                node device details in XML
    nodedev-list                   enumerate devices on this host
    nodedev-reattach               reattach node device to its device driver
    nodedev-reset                  reset node device
there is no redundant command "nodedev-dettach" in command "virsh help nodedev"
so verify this bug.

Comment 6 Ludek Smid 2014-06-13 12:14:27 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.