Hi experts ,
        I simplified the issue repetition steps , 

cluster12-b: # cat ovs-network.xml
<?xml version="1.0"?>
<network>
    <name>2.11-ovs-network</name>
    <forward mode="bridge"/>
    <bridge name="br-oam"/>
    <virtualport type="openvswitch"/>
    <portgroup name="2.11-vlan-01" default="yes">
    </portgroup>
    <portgroup name="2.11-SC-eth1">
        <vlan>
            <tag id="3932"/>
        </vlan>
    </portgroup>
    <portgroup name="2.11-SC-eth2">
        <vlan>
            <tag id="3933"/>
        </vlan>
    </portgroup>
    <portgroup name="2.11-vlan-all">
        <vlan trunk="yes">
            <tag id="3932"/>
            <tag id="3933"/>
        </vlan>
    </portgroup>
</network>
cluster12-b: # virsh list --all
 Id   Name   State
--------------------

cluster12-b: # virsh net-list --all
 Name   State   Autostart   Persistent
----------------------------------------

cluster12-b: # virsh net-define ovs-network.xml
Network 2.11-ovs-network defined from ovs-network.xml

cluster12-b: # virsh net-list --all
 Name               State      Autostart   Persistent
-------------------------------------------------------
 2.11-ovs-network   inactive   no          yes

cluster12-b: # virsh net-start 2.11-ovs-network
Network 2.11-ovs-network started

cluster12-b: # virsh net-list --all
 Name               State    Autostart   Persistent
-----------------------------------------------------
 2.11-ovs-network   active   no          yes

cluster12-b: # ovs-vsctl show
2e9bf291-50ac-4c3a-ac55-2d590df1880d
    ovs_version: "2.14.2"
cluster12-b: # ovs-vsctl add-br br-oam
cluster12-b: # ovs-vsctl show
2e9bf291-50ac-4c3a-ac55-2d590df1880d
    Bridge br-oam
        Port br-oam
            Interface br-oam
                type: internal
    ovs_version: "2.14.2"
cluster12-b: # ovs-vsctl add-port br-oam bond1 trunk=3932,3933
cluster12-b: # ovs-vsctl show
2e9bf291-50ac-4c3a-ac55-2d590df1880d
    Bridge br-oam
        Port br-oam
            Interface br-oam
                type: internal
        Port bond1
            trunks: [3932, 3933]
            Interface bond1
    ovs_version: "2.14.2"
cluster12-b: # date
Tue Oct 17 13:47:02 CST 2023
cluster12-b: # service network restart 
cluster12-b: # ovs-vsctl show
2e9bf291-50ac-4c3a-ac55-2d590df1880d
    Bridge br-oam
        Port br-oam
            Interface br-oam
                type: internal
    ovs_version: "2.14.2"
cluster12-b: #

it seems like a common issue . 

//An

-----Original Message-----
From: Ilya Maximets <i.maxim...@ovn.org> 
Sent: Monday, October 16, 2023 6:54 PM
To: Liqi An <liqi...@ericsson.com>; ovs-discuss@openvswitch.org
Cc: Cheng Chi <cheng....@ericsson.com>; Jonas Yi <jonas...@ericsson.com>; Yawei 
Lu <yawei...@ericsson.com>; i.maxim...@ovn.org
Subject: Re: [ovs-discuss] Restarting the network triggers the deletion of one 
ovs port

On 10/16/23 07:38, Liqi An via discuss wrote:
> Hi experts,
> 
>    I am having a very strange problem with matching virtual machines 
> installations with openvswitch. My operating system is suse15-sp4;
> 
> cluster12-b:~ # cat /etc/os-release
> /NAME="SLES"/
> /VERSION="15-SP4"/
> /VERSION_ID="15.4"/
> /PRETTY_NAME="SUSE Linux Enterprise Server 15 SP4"/ /ID="sles"/ 
> /ID_LIKE="suse"/ /ANSI_COLOR="0;32"/ 
> /CPE_NAME="cpe:/o:suse:sles:15:sp4"/
> /DOCUMENTATION_URL=https://documentation.suse.com/ 
> <https://documentation.suse.com/>/
> 
> cluster12-b:~ # rpm -qa |grep openvswitch 
> /openvswitch-2.14.2-150400.22.23.x86_64/
> 
> cluster12-b:~ # virsh net-list --all
> 
> /Name               State    Autostart   Persistent/ 
> /-----------------------------------------------------/
> /2.11-ovs-network   active   yes         yes/
> 
> bond1 was used by the VMs:
> …
>    Bridge br-oam
>         Port bond1
>             trunks: [3932, 3933]
>             Interface bond1
>         Port "2.11-SC-2-eth1"
>             tag: 3932
>             Interface "2.11-SC-2-eth1"
>         Port br-oam
>             Interface br-oam
>                 type: internal
>         Port "2.11-SC-2-eth2"
>             tag: 3933
>             Interface "2.11-SC-2-eth2"
> 
>      But when I restarted the network service by command: # service 
> network restart , this port bond1 lost in the bridge br-oam , and 
> there are some abnormal log in systemlog, Detailed operation logs are 
> attached
> 
> …
> /25302 2023-10-16T13:07:12.708071+08:00 cluster12-b kernel: 
> [340552.475586][ T2447] device eth1 left promiscuous mode/
> /25303 2023-10-16T13:07:12.824022+08:00 cluster12-b kernel: 
> [340552.593298][ T2447] bonding: bond0 is being deleted.../
> /25304 2023-10-16T13:07:12.824045+08:00 cluster12-b kernel: 
> [340552.593393][ T2447] bond0 (unregistering): Released all slaves/
> /25305 2023-10-16T13:07:12.881576+08:00 cluster12-b systemd[1]: 
> Starting Generate issue file for login session.../
> /25306 2023-10-16T13:07:12.905589+08:00 cluster12-b systemd[1]: 
> issue-generator.service: Deactivated successfully./
> /25307 2023-10-16T13:07:12.905662+08:00 cluster12-b systemd[1]: 
> Finished Generate issue file for login session./
> /25308 2023-10-16T13:07:17.668420+08:00 cluster12-b ovs-vsctl: 
> ovs|00001|vsctl|INFO|Called as /usr/bin/ovs-vsctl del-port br-oam 
> bond1/
> /25309 2023-10-16T13:07:17.676015+08:00 cluster12-b kernel: 
> [340557.444150][ T2261] device bond1 left promiscuous mode/
> /25310 2023-10-16T13:07:17.720080+08:00 cluster12-b kernel: 
> [340557.486796][ T2447] bonding: bond1 is being deleted.../
> /25311 2023-10-16T13:07:17.720097+08:00 cluster12-b kernel: 
> [340557.486891][ T2447] bond1 (unregistering): Released all slaves/

IIUC, the 'bond1' is some sort of a kernel bonding device configured outside of 
OVS.  And it is getting removed.
When you restart the network, the system will execute whatever network 
configuration is in your system settings, e.g. stuff from 
/etc/sysconfig/network-scripts, maybe NetworkManager is going to re-apply its 
configuration or netplan, I don't really know what SUSE is using.
So, you should look in these places for things that manage the bond1 interface.

Best regards, Ilya Maximets.

> 
> It seemed that Restarting the host's network service automatically 
> triggered behavior: /as /usr/bin/ovs-vsctl del-port br-oam bond1/
> 
> Also, I restart host which causes the same issue, would you please 
> help check and give some advice, thx~
> 
> //An
_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to