Bug 1447339 - iface-dumpxml error when define a vlan type interface with name 'vlan'
Summary: iface-dumpxml error when define a vlan type interface with name 'vlan'
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: netcf
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: chhu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-02 12:49 UTC by Jingjing Shao
Modified: 2020-11-02 19:35 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-02 19:35:47 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jingjing Shao 2017-05-02 12:49:20 UTC
Description of problem:

interface name can't be changed when define a vlan type interface

Version-Release number of selected component (if applicable):

libvirt-3.2.0-3.el7.x86_64
netcf-0.2.8-4.el7.x86_64


How reproducible:

100%

Steps to Reproduce:

1. # cat vlan.xml
<interface type='vlan' name='vlan'>
<start mode='onboot'/>
<protocol family='ipv4'>
<ip address='192.168.177.1' prefix='24'/>
</protocol>
<vlan tag='1'>
<interface name='eno1'/>
</vlan>
</interface>

2. # virsh iface-define vlan.xml
Interface vlan defined from vlan.xml

3. # virsh iface-list --all
 Name                 State      MAC Address
---------------------------------------------------
 eno1                 active     44:37:e6:95:03:e4
 lo                   active     00:00:00:00:00:00
 vlan                 inactive   

4. # virsh iface-dumpxml vlan
error: XML error: vlan interface misses the tag attribute


Actual results:
As the steps4

Expected results:
The iface-dumpxml valn should successfully

Additional info:

Comment 2 Laine Stump 2017-05-02 14:10:04 UTC
I'm pretty sure that the initscripts code supporting the "vlanNNN" naming convention for vlan devices requires the tag id to be appended to the device name, so what's really needed is a more thorough validation of the requested name.

Comment 5 Laine Stump 2020-11-02 19:35:47 UTC
This is another example of a problem with the workaround "Don't do that". It hasn't been encountered by an actual user, but only in QE testing.


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