Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-7299

Updating portgroup of ovs interface should fail

    • None
    • Moderate
    • rhel-sst-virtualization-networking
    • ssg_virtualization
    • 1
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • 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

      1. 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:

      1. virsh attach-interface vm111 --type network --source ovs-net --model virtio
        Interface attached successfully
      1. 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>
      1. 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:

      1. 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>
      1. virsh update-device vm111 ovs-inc.xml
        Device updated successfully

      6. Check the updated interface:

      1. 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>
      1. 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:

      1. 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

              rh-ee-ajulis Adam Julis
              rhn-support-fjin Fangge Jin
              virt-maint virt-maint
              Haijiao Zhao Haijiao Zhao
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: