-
Bug
-
Resolution: Unresolved
-
Normal
-
rhel-9.1.0
-
None
-
Moderate
-
sst_virtualization_networking
-
ssg_virtualization
-
1
-
False
-
-
None
-
None
-
None
-
None
-
If docs needed, set a value
-
-
Unspecified
-
None
Description of problem:
Update portgroup of ovs interface, the port tag is cleared unexpectedly.
Version-Release number of selected component (if applicable):
libvirt-8.5.0-6.el9.x86_64
openvswitch2.15-2.15.0-70.el9fdp.x86_64
How reproducible:
100%
Steps to Reproduce:
1. Create an openvswitch bridge
- ovs-vsctl show
ce606951-de6b-4515-9280-44b2a6766a57
Bridge "ovsbr0"
Port "ovsbr0"
Interface "ovsbr0"
type: internal
Port "eno8303"
Interface "eno8303"
ovs_version: "2.15.6"
2. Create an openvswitch network:
<network>
<name>ovs-net</name>
<uuid>1546c287-e22f-41c5-8eef-12ccb8a54af6</uuid>
<forward mode='bridge'/>
<bridge name='ovsbr0'/>
<vlan trunk='yes'>
<tag id='42' nativeMode='untagged'/>
<tag id='47'/>
</vlan>
<virtualport type='openvswitch'>
<parameters interfaceid='09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f'/>
</virtualport>
<portgroup name='dontpanic'>
<vlan>
<tag id='42'/>
</vlan>
</portgroup>
</network>
3. Start a vm
4. Attach a openvswitch interface to vm:
- virsh attach-interface vm111 --type network --source ovs-net --model virtio
Interface attached successfully
- virsh dumpxml vm111 --xpath //interface
<interface type="bridge">
<mac address="52:54:00:07:7e:14"/>
<source network="ovs-net" portid="555b1703-8f01-4f74-b15d-674b0c5e695a" bridge="ovsbr0"/>
<vlan trunk="yes">
<tag id="42" nativeMode="untagged"/>
<tag id="47"/>
</vlan>
<virtualport type="openvswitch">
<parameters interfaceid="09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f"/>
</virtualport>
<target dev="vnet3"/>
<model type="virtio"/>
<alias name="net0"/>
<address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
</interface>
- ovs-vsctl show
ce606951-de6b-4515-9280-44b2a6766a57
Bridge ovsbr0
Port ovsbr0
Interface ovsbr0
type: internal
Port vnet3
tag: 42
trunks: [42, 47]
Interface vnet3
Port eno8303
Interface eno8303
ovs_version: "2.15.6"
5. Update interface portgroup:
- cat ovs-inc.xml
<interface type="network">
<mac address="52:54:00:e9:a0:ba"/>
<source network='ovs-net' portgroup='dontpanic'/>
<model type="virtio"/>
<address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
</interface>
- virsh update-device vm111 ovs-inc.xml
Device updated successfully
6. Check the updated interface:
- virsh dumpxml vm111 --xpath //interface
<interface type="bridge">
<mac address="52:54:00:e9:a0:ba"/>
<source network="ovs-net" portgroup="dontpanic" portid="a31b4f86-cfe7-4951-b23a-1f6465df7345" bridge="ovsbr0"/>
<vlan>
<tag id="42"/>
</vlan>
<virtualport type="openvswitch">
<parameters interfaceid="09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f"/>
</virtualport>
<target dev="vnet4"/>
<model type="virtio"/>
<alias name="net0"/>
<address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
</interface>
- ovs-vsctl show
ce606951-de6b-4515-9280-44b2a6766a57
Bridge ovsbr0
Port ovsbr0
Interface ovsbr0
type: internal
Port eno8303
Interface eno8303
Port vnet4
Interface vnet4
ovs_version: "2.15.6"
Actual results:
When updating interface portgroup, ovs port tag is cleared.
Expected results:
Updating interface portgroup should fail like:
- virsh update-device rhel interface.xml
error: Failed to update device from interface.xml
error: internal error: Unable to set vlan configuration on port vnet4
Additional info:
1. Check the syslog:
ovs-vsctl[286450]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --timeout=5 – --if-exists clear Port vnet4 tag – --if-exists clear Port vnet4 trunk – --if-exists clear Port vnet4 vlan_mode
- external trackers