Subport: Ping failed after cluster reboot 42/83042/4
authorShashidhar Raja <shashidharr@altencalsoftlabs.com>
Mon, 15 Jul 2019 10:29:12 +0000 (15:59 +0530)
committerFaseela K <faseela.k@ericsson.com>
Tue, 27 Aug 2019 05:26:03 +0000 (05:26 +0000)
commit748ef665214300a3ae561fce84a1fca90a757610
tree356f7c5bf9eb2df97abec577d4a4be3aed7a69fb
parent72c1dafe596a141619820c6702136c6f4695482a
Subport: Ping failed after cluster reboot

With cluster reboot, subport interfaces some times gets created as Trunk
interfaces. This is mainly because of port and trunk replay executing in
irregular order after reboot sometimes.

Below changes are done to fix above problem:
(a) New yang container as shown below is introduced to save subport details
needed for creating subport-interface in CONFIG DS (this is defined in neutronvpn.yang)

    container neutron-vpn-port-id-subport-data {
        config true;
        list port-id-to-subport {
            key port-id;
            leaf port-id { type yang:uuid; }
            leaf vlan-id { type uint32; }
            leaf trunk-port-id { type yang:uuid; }
        }
    }

(b) After cluster restart, get details about subport from config DS using neutron port id.
If data is present, create interface as subport interface (trunk-member) otherwise create
it as trunk interface.

Change-Id: I8a7baf868ef51c1f8264d79020564e2e89207bfa
Signed-off-by: Shashidhar Raja <shashidharr@altencalsoftlabs.com>
neutronvpn/api/src/main/yang/neutronvpn.yang
neutronvpn/impl/src/main/java/org/opendaylight/netvirt/neutronvpn/NeutronPortChangeListener.java
neutronvpn/impl/src/main/java/org/opendaylight/netvirt/neutronvpn/NeutronTrunkChangeListener.java
neutronvpn/impl/src/main/java/org/opendaylight/netvirt/neutronvpn/NeutronvpnUtils.java