Bug 1126721

Summary: [Doc] Attribute name vlan-id should be vlanid in nwfilter xml docs
Product: Red Hat Enterprise Linux 7 Reporter: Hu Jianwei <jiahu>
Component: libvirtAssignee: Ján Tomko <jtomko>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 7.0CC: dyuan, honzhang, jtomko, mzhan, rbalakri, sowang
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-1.2.8-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 07:41:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Hu Jianwei 2014-08-05 06:58:40 UTC
Description of problem:
Typo error attribute name vlan-id should be vlanid

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

How reproducible:
100%

Steps to Reproduce:
[root@localhost ~]# virsh nwfilter-dumpxml myself
<filter name='myself' chain='root'>
  <uuid>7192ef51-cd50-4f14-ad7b-fa5c69ea19e3</uuid>
  <rule action='accept' direction='in' priority='500'>
    <vlan dstmacaddr='00:11:22:33:44:55' vlanid='44'/>
  </rule>
</filter>

[root@localhost ~]# ebtables -t nat -L
Bridge table: nat

...
-p 802_1Q -d 0:11:22:33:44:55 --vlan-id 44 -j ACCEPT

Actual results:
As shown above testing steps, vlanid is correct spelling for vlan id, not vlan-id.

file:///usr/share/doc/libvirt-docs-1.2.6/html/formatnwfilter.html#nwfelemsRulesProtoVLAN

Expected results:
Using "vlanid" instead of "vlan-id" in related docs.

Comment 2 Hu Jianwei 2014-08-05 07:13:26 UTC
Candidate patch:
http://www.redhat.com/archives/libvir-list/2014-August/msg00079.html

Thanks.

Comment 3 Ján Tomko 2014-08-05 08:01:11 UTC
Now fixed upstream:
commit 55f34fe3bdeb1aa2eb424fec3b8335ffff027a62
Author:     Jianwei Hu <jiahu@redhat.com>
CommitDate: 2014-08-05 09:59:17 +0200

    Fix vlanid attribute name in nwfilter docs
    
    'vlanid' is the attribute name in our XML,
    'vlan-id' is the ebtables attribute:
    
    [root@localhost ~]# virsh nwfilter-dumpxml myself
    <filter name='myself' chain='root'>
      <uuid>7192ef51-cd50-4f14-ad7b-fa5c69ea19e3</uuid>
      <rule action='accept' direction='in' priority='500'>
        <vlan dstmacaddr='00:11:22:33:44:55' vlanid='44'/>
      </rule>
    </filter>
    
    [root@localhost ~]# ebtables -t nat -L
    Bridge table: nat
    
    ...
    -p 802_1Q -d 0:11:22:33:44:55 --vlan-id 44 -j ACCEPT
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1126721
    
    Signed-off-by: Ján Tomko <jtomko@redhat.com>

git describe: v1.2.7-8-g55f34fe

Comment 5 Song Wang 2014-12-15 05:43:59 UTC
(In reply to Jan Tomko from comment #3)
> Now fixed upstream:
> commit 55f34fe3bdeb1aa2eb424fec3b8335ffff027a62
> Author:     Jianwei Hu <jiahu@redhat.com>
> CommitDate: 2014-08-05 09:59:17 +0200
> 
>     Fix vlanid attribute name in nwfilter docs
>     
>     'vlanid' is the attribute name in our XML,
>     'vlan-id' is the ebtables attribute:
>     
>     [root@localhost ~]# virsh nwfilter-dumpxml myself
>     <filter name='myself' chain='root'>
>       <uuid>7192ef51-cd50-4f14-ad7b-fa5c69ea19e3</uuid>
>       <rule action='accept' direction='in' priority='500'>
>         <vlan dstmacaddr='00:11:22:33:44:55' vlanid='44'/>
>       </rule>
>     </filter>
>     
>     [root@localhost ~]# ebtables -t nat -L
>     Bridge table: nat
>     
>     ...
>     -p 802_1Q -d 0:11:22:33:44:55 --vlan-id 44 -j ACCEPT
>     
>     https://bugzilla.redhat.com/show_bug.cgi?id=1126721
>     
>     Signed-off-by: Ján Tomko <jtomko@redhat.com>
> 
> git describe: v1.2.7-8-g55f34fe

1.[root@localhost libvirt]# rpm -q libvirt
libvirt-1.2.8-10.el7.x86_64

2.[root@localhost libvirt]# virsh nwfilter-dumpxml aa
<filter name='aa' chain='root'>
  <uuid>7192ef51-cd50-4f14-ad7b-fa5c69ea19e3</uuid>
  <rule action='accept' direction='in' priority='500'>
    <vlan dstmacaddr='00:11:22:33:44:55' vlanid='44'/>
  </rule>
</filter>

3.[root@localhost libvirt]# virsh dumpxml cc |grep interface -A7
    <interface type='network'>
      <mac address='52:54:00:5a:a0:8d'/>
      <source network='default'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <filterref filter='aa'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </interface>

4.[root@localhost libvirt]# ebtables -t nat -L
Bridge table: nat

Bridge chain: PREROUTING, entries: 0, policy: ACCEPT

Bridge chain: OUTPUT, entries: 0, policy: ACCEPT

Bridge chain: POSTROUTING, entries: 1, policy: ACCEPT
-o vnet0 -j libvirt-O-vnet0

Bridge chain: libvirt-O-vnet0, entries: 1, policy: ACCEPT
-p 802_1Q -d 0:11:22:33:44:55 --vlan-id 44 -j ACCEPT         <----it still shows '--vlan-id '

5.[root@localhost libvirt]# vi /usr/share/doc/libvirt-docs-1.2.8/html/formatnwfilter.html 
......
    </p>
        <table class="top_table"><tr><th rowspan="1" colspan="1"> Attribute </th><th rowspan="1" colspan="1"> Datatype </th><th rowspan="1" colspan="1"> Semantics </th></tr><tr><td rowspan="1" colspan="1">srcmacaddr</td><td rowspan="1" colspan="1">MAC_ADDR</td><td rowspan="1" colspan="1">MAC address of sender</td></tr><tr><td rowspan="1" colspan="1">srcmacmask</td><td rowspan="1" colspan="1">MAC_MASK</td><td rowspan="1" colspan="1">Mask applied to MAC address of sender</td></tr><tr><td rowspan="1" colspan="1">dstmacaddr</td><td rowspan="1" colspan="1">MAC_ADDR</td><td rowspan="1" colspan="1">MAC address of destination</td></tr><tr><td rowspan="1" colspan="1">dstmacmask</td><td rowspan="1" colspan="1">MAC_MASK</td><td rowspan="1" colspan="1">Mask applied to MAC address of destination</td></tr><tr><td rowspan="1" colspan="1">vlanid</td><td rowspan="1" colspan="1">UINT16 (0x0-0xfff, 0 - 
            ^^^^^^
4095)</td><td rowspan="1" colspan="1">VLAN ID</td></tr><tr><td rowspan="1" colspan="1">encap-protocol</td><td rowspan="1" colspan="1">UINT16 (0x03c-0xfff), String</td><td rowspan="1" colspan="1">Encapsulated layer 3 protocol ID</td></tr><tr><td rowspan="1" colspan="1">comment </td><td rowspan="1" colspan="1">STRING</td><td rowspan="1" colspan="1">text with max. 256 characters</td></tr></table>
        <p>
.....

maybe it is rules to show 'vlan-id'  after run the command 'ebtables -t nat -L' and we should change the nwfilter xml format to be ' vlan-id='44' '.

Comment 6 Ján Tomko 2015-01-05 10:04:54 UTC
We cannot change it - changing the XML format would break backward compatibility.

Comment 7 Song Wang 2015-01-06 02:27:00 UTC
Yes,the bug is fixed for the problem.so I change the state to Verified.

Comment 9 errata-xmlrpc 2015-03-05 07:41:45 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/RHSA-2015-0323.html