Hide Forgot
Description of problem: <copy&paste from email> In brief, there are four cases: (1)when one slave is enabled, I changed it to disable by using disable-slave command, it will became disabled, but it will return to enabled after the updelay expired. (2)When one slave from up to down by using ip link command, it will became disabled after the updelay expired. (3)when one slave is disabled, I changed it to enable by using enable-slave command, it will became enabled, but it will return to disabled after the downdelay expired. (4)When one slave from down to up by using ip link command, it will became enabled after the downdelay expired. I can understand the (2) and (4) cases, but the (1) and (3) cases makes me confused, the state of the change is valid only before the delay time. Should it like this? If it should be like this, What scene is it used for? I added a bond as below. ovs-vsctl add-bond br0 bond0 ens5f0 ens5f1 bond_updelay=5000 bond_downdelay=10000 Then check it: [root@ibm-x3650m5-02 ~]# ovs-vsctl show bd880e8f-a556-4ff0-8986-68547cac87e7 Bridge "br0" Port "br0" Interface "br0" type: internal Port "bond0" Interface "ens5f0" Interface "ens5f1" ovs_version: "2.5.0" [root@ibm-x3650m5-02 ~]# ovs-appctl bond/show ---- bond0 ---- bond_mode: active-backup bond may use recirculation: no, Recirc-ID : -1 bond-hash-basis: 0 updelay: 5000 ms downdelay: 10000 ms lacp_status: off active slave mac: 00:0e:1e:ba:28:e0(ens5f0) slave ens5f0: enabled active slave may_enable: true slave ens5f1: enabled may_enable: true Then I use command disable ens5f0, the ens5f0 changed to the disabled. [root@ibm-x3650m5-02 ~]# ovs-appctl bond/disable-slave bond0 ens5f0 disabled [root@ibm-x3650m5-02 ~]# ovs-appctl bond/show ---- bond0 ---- bond_mode: active-backup bond may use recirculation: no, Recirc-ID : -1 bond-hash-basis: 0 updelay: 5000 ms downdelay: 10000 ms lacp_status: off active slave mac: 00:0e:1e:ba:28:e2(ens5f1) slave ens5f0: disabled updelay expires in 3193 ms may_enable: true slave ens5f1: enabled active slave may_enable: true After the updelay expired, ens5f0 return to enabled. [root@ibm-x3650m5-02 ~]# ovs-appctl bond/show ---- bond0 ---- bond_mode: active-backup bond may use recirculation: no, Recirc-ID : -1 bond-hash-basis: 0 updelay: 5000 ms downdelay: 10000 ms lacp_status: off active slave mac: 00:0e:1e:ba:28:e2(ens5f1) slave ens5f0: enabled may_enable: true slave ens5f1: enabled active slave may_enable: true I put the ens5f1 down, the ens5f1 became disable after the downdelay expired. It is easy to understand. [root@ibm-x3650m5-02 ~]# ip link set ens5f0 down [root@ibm-x3650m5-02 ~]# ovs-appctl bond/show ---- bond0 ---- bond_mode: active-backup bond may use recirculation: no, Recirc-ID : -1 bond-hash-basis: 0 updelay: 5000 ms downdelay: 10000 ms lacp_status: off active slave mac: 00:0e:1e:ba:28:e2(ens5f1) slave ens5f0: enabled downdelay expires in 8838 ms may_enable: false slave ens5f1: enabled active slave may_enable: true After the downdelay expired, [root@ibm-x3650m5-02 ~]# ovs-appctl bond/show ---- bond0 ---- bond_mode: active-backup bond may use recirculation: no, Recirc-ID : -1 bond-hash-basis: 0 updelay: 5000 ms downdelay: 10000 ms lacp_status: off active slave mac: 00:0e:1e:ba:28:e2(ens5f1) slave ens5f0: disabled may_enable: false slave ens5f1: enabled active slave may_enable: true And I used command make ens5f0 enable, [root@ibm-x3650m5-02 ~]# ovs-appctl bond/enable-slave bond0 ens5f0 enabled [root@ibm-x3650m5-02 ~]# ovs-appctl bond/show ---- bond0 ---- bond_mode: active-backup bond may use recirculation: no, Recirc-ID : -1 bond-hash-basis: 0 updelay: 5000 ms downdelay: 10000 ms lacp_status: off active slave mac: 00:0e:1e:ba:28:e2(ens5f1) slave ens5f0: enabled downdelay expires in 8822 ms may_enable: false slave ens5f1: enabled active slave may_enable: true After the downdelay expired, ens5f0 return to disabled. [root@ibm-x3650m5-02 ~]# ovs-appctl bond/show ---- bond0 ---- bond_mode: active-backup bond may use recirculation: no, Recirc-ID : -1 bond-hash-basis: 0 updelay: 5000 ms downdelay: 10000 ms lacp_status: off active slave mac: 00:0e:1e:ba:28:e2(ens5f1) slave ens5f0: disabled may_enable: false slave ens5f1: enabled active slave may_enable: true Then I make the ens5f0 up, [root@ibm-x3650m5-02 ~]# ip link set ens5f0 up [root@ibm-x3650m5-02 ~]# ovs-appctl bond/show ---- bond0 ---- bond_mode: active-backup bond may use recirculation: no, Recirc-ID : -1 bond-hash-basis: 0 updelay: 5000 ms downdelay: 10000 ms lacp_status: off active slave mac: 00:0e:1e:ba:28:e2(ens5f1) slave ens5f0: disabled updelay expires in 3977 ms may_enable: true slave ens5f1: enabled active slave may_enable: true After updalay expired, ens5f0 became to enabled as below, [root@ibm-x3650m5-02 ~]# ovs-appctl bond/show ---- bond0 ---- bond_mode: active-backup bond may use recirculation: no, Recirc-ID : -1 bond-hash-basis: 0 updelay: 5000 ms downdelay: 10000 ms lacp_status: off active slave mac: 00:0e:1e:ba:28:e2(ens5f1) slave ens5f0: enabled may_enable: true slave ens5f1: enabled active slave may_enable: true The ovs-vswitchd.log as below: 2016-07-27T03:37:11.071Z|00457|bond|INFO|interface ens5f0: disabled 2016-07-27T03:37:11.071Z|00458|bond|INFO|interface ens5f0: link state up 2016-07-27T03:37:11.071Z|00459|bond|INFO|interface ens5f0: will be enabled if it stays up for 5000 ms 2016-07-27T03:37:16.071Z|00460|bond|INFO|interface ens5f0: enabled 2016-07-27T03:46:12.548Z|00461|bond|INFO|interface ens5f0: link state down 2016-07-27T03:46:12.548Z|00462|bond|INFO|interface ens5f0: will be disabled if it stays down for 10000 ms 2016-07-27T03:46:12.548Z|00463|bridge|WARN|Dropped 1 log messages in last 708 seconds (most recently, 708 seconds ago) due to excessive rate 2016-07-27T03:46:12.548Z|00464|bridge|WARN|port bond0: Using the default bond_mode active-backup. Note that in previous versions, the default bond_mode was balance-slb 2016-07-27T03:46:22.548Z|00465|bond|INFO|interface ens5f0: disabled 2016-07-27T04:48:36.419Z|00466|bond|INFO|interface ens5f0: enabled 2016-07-27T04:48:36.419Z|00467|bond|INFO|interface ens5f0: link state down 2016-07-27T04:48:36.419Z|00468|bond|INFO|interface ens5f0: will be disabled if it stays down for 10000 ms 2016-07-27T04:48:46.419Z|00469|bond|INFO|interface ens5f0: disabled 2016-07-27T05:37:20.458Z|00470|bridge|WARN|port bond0: Using the default bond_mode active-backup. Note that in previous versions, the default bond_mode was balance-slb 2016-07-27T05:37:20.458Z|00471|bond|INFO|interface ens5f0: link state up 2016-07-27T05:37:20.458Z|00472|bond|INFO|interface ens5f0: will be enabled if it stays up for 5000 ms 2016-07-27T05:37:25.459Z|00473|bond|INFO|interface ens5f0: enabled Version-Release number of selected component (if applicable): ovs 2.4 How reproducible: Always Actual results: The interface is re-enabled if there is a valid link. Expected results: The interface to remains disabled
In OVS there is no difference to administratively disabling/enabling a port vs operational enabling/disabling based on the link status. Will need to create a modification distinguishing between the two.
This behaviour is according to the documentation; The behavior matches the documentation: bond/enable-slave port slave bond/disable-slave port slave Enables (or disables) slave on the given bond port, skipping any updelay (or downdelay). This setting is not permanent: it persists only until the carβ rier status of slave changes.
Closing BZ as this is working per design. For administratively disabling the slaves we should either remove the slave from the bundle, or bring the link down.