Bug 1127045 - Libvirt should provide more accurate help messages of iface/net/pool-define in manpage and help
Summary: Libvirt should provide more accurate help messages of iface/net/pool-define i...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-06 03:13 UTC by Hu Jianwei
Modified: 2015-11-19 05:47 UTC (History)
5 users (show)

Fixed In Version: libvirt-1.2.14-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 05:47:25 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2202 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2015-11-19 08:17:58 UTC

Description Hu Jianwei 2014-08-06 03:13:14 UTC
Description of problem:
 Libvirt should provide more accurate help messages of iface/net/pool-define in man vish and virsh help
Version-Release number of selected component (if applicable):
libvirt-1.2.6-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
<1> For iface-define:
[root@localhost network-scripts]# man virsh
       iface-define file
           Define a host interface from an XML file, the interface is just defined but not started.

[root@localhost network-scripts]# virsh help iface-define
  NAME
    iface-define - define (but don't start) a physical host interface from an XML file

  SYNOPSIS
    iface-define <file>

  DESCRIPTION
    Define a physical host interface.

  OPTIONS
    [--file] <string>  file containing an XML interface description

<2> For pool-define:
[root@localhost ~]# man virsh
pool-define file
           Create, but do not start, a pool object from the XML file.

[root@localhost ~]# virsh help pool-define
  NAME
    pool-define - define (but don't start) a pool from an XML file

  SYNOPSIS
    pool-define <file>

  DESCRIPTION
    Define a pool.

  OPTIONS
    [--file] <string>  file containing an XML pool description

<3> For net-define:
[root@localhost ~]# man virsh
net-define file
           Define a persistent virtual network from an XML file, the network is just defined but not instantiated (started).

[root@localhost ~]# virsh help net-define
  NAME
    net-define - define (but don't start) a network from an XML file

  SYNOPSIS
    net-define <file>

  DESCRIPTION
    Define a network.

  OPTIONS
    [--file] <string>  file containing an XML network description


Actual results:
As shown above help message, for example:

iface-define have a default function to update an existing physical host interface.

[root@localhost network-scripts]# virsh iface-list --all
Name                 State      MAC Address
--------------------------------------------
enp2s0               active     00:1b:21:27:4e:ce

[root@localhost network-scripts]# virsh iface-dumpxml enp2s0 --inactive
<interface type='ethernet' name='enp2s0'>
  <start mode='onboot'/>
  <protocol family='ipv4'>
    <ip address='10.66.70.108' prefix='23'/>
  </protocol>
</interface>

[root@localhost network-scripts]# cat enp2s0.xml
<interface type='ethernet' name='enp2s0'>
  <start mode='onboot'/>
  <mtu size='1500'/>
  <protocol family='ipv4'>
    <ip address='10.66.70.108' prefix='23'/>
  </protocol>
</interface>

[root@localhost network-scripts]# virsh iface-define enp2s0.xml
Interface enp2s0 defined from enp2s0.xml

[root@localhost network-scripts]# virsh iface-dumpxml enp2s0 --inactive
<interface type='ethernet' name='enp2s0'>
  <start mode='onboot'/>
  <mtu size='1500'/>
  <protocol family='ipv4'>
    <ip address='10.66.70.108' prefix='23'/>
  </protocol>
</interface>

Aslo, on net and pool, define command can update a net or pool with the same name and UUID exists.

Expected results:
For example on iface-define 
In man virsh
       iface-define file
           Define a host interface from an XML file, the interface is just defined but not started, or update an existing one.

In virsh help
 NAME
    iface-define - define (but don't start) or update a physical host interface from an XML file

  DESCRIPTION
    Define a physical host interface or update an existing one.

For net/pool-define should have similar updates.

Comment 1 Hu Jianwei 2014-08-06 03:14:27 UTC
Upstream patch:
http://www.redhat.com/archives/libvir-list/2014-July/msg01381.html

Comment 4 Pavel Hrdina 2015-02-25 15:58:11 UTC
Patches proposed upstream:

https://www.redhat.com/archives/libvir-list/2015-February/msg01075.html

Comment 5 Pavel Hrdina 2015-03-09 14:17:47 UTC
Upstream patches:

commit b7d027b6a8b5a3c4094920d59f61d820ccbc0b0f
Author: Pavel Hrdina <phrdina@redhat.com>
Date:   Wed Feb 25 16:01:09 2015 +0100

    net-define: update or unify documentation
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1127045
    
    Signed-off-by: Pavel Hrdina <phrdina@redhat.com>

commit 03369d9643a1d96b385455bcbd13f9fcc9bd7470
Author: Pavel Hrdina <phrdina@redhat.com>
Date:   Wed Feb 25 15:51:41 2015 +0100

    pool-define: update and unify documentation
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1127045
    
    Signed-off-by: Pavel Hrdina <phrdina@redhat.com>

commit 0632555927ac2822bf0997394643bb9d1b8e6d71
Author: Pavel Hrdina <phrdina@redhat.com>
Date:   Wed Feb 25 15:37:00 2015 +0100

    iface-define: update and unify documentation
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1127045
    
    Signed-off-by: Pavel Hrdina <phrdina@redhat.com>

Comment 9 Fangge Jin 2015-08-31 09:51:19 UTC
I can reproduce on build libvirt-1.2.13-1.el7.x86_64

Verify this on build libvirt-1.2.17-6.el7.x86_64

Steps:
# virsh iface-define --help
  NAME
    iface-define - define an inactive persistent physical host interface or modify an existing persistent one from an XML file

  SYNOPSIS
    iface-define <file>

  DESCRIPTION
    Define or modify a persistent physical host interface.

  OPTIONS
    [--file] <string>  file containing an XML interface description

# virsh net-define --help
  NAME
    net-define - define an inactive persistent virtual network or modify an existing persistent one from an XML file

  SYNOPSIS
    net-define <file>

  DESCRIPTION
    Define or modify a persistent virtual network.

  OPTIONS
    [--file] <string>  file containing an XML network description


# virsh pool-define --help
  NAME
    pool-define - define an inactive persistent storage pool or modify an existing persistent one from an XML file

  SYNOPSIS
    pool-define <file>

  DESCRIPTION
    Define or modify a persistent storage pool.

  OPTIONS
    [--file] <string>  file containing an XML pool description

Comment 11 errata-xmlrpc 2015-11-19 05:47:25 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.

https://rhn.redhat.com/errata/RHBA-2015-2202.html


Note You need to log in before you can comment on or make changes to this bug.