kytos-ng / mef_eline

Kytos NApp to create and manage point-to-point L2 circuits
https://kytos-ng.github.io/api/mef_eline.html
MIT License
0 stars 8 forks source link

bug: mef_eline `current_path` and `failover_path` ended up using the same path but with diff svlans #470

Open viniarck opened 3 months ago

viniarck commented 3 months ago

When I was exploring link down and controller restart, there was a case where current_path ended up using the same path as failover_path, but with a different svlan.

By design, failover_path is supposed to be disjoint with current_path, so this shouldn't happen. I only noticed this issue when I saw the EVC output that I collected during a test (after I no longer had the scenario up and running), so I don't know if it was just transitory and how the flows actually were at that time. Either way, I'll register this bug here for future ref and to be eventually confirmed or not, it's worth trying to explore more link down/up with controller restarts with EVCs that have failover:

diff current_path.json failover_path.json
43c43
<                         "value": 2
---
>                         "value": 1
{
    "c9f71897abd243": {
        "active": true,
        "archived": false,
        "backup_path": [],
        "bandwidth": 0,
        "circuit_scheduler": [],
        "current_path": [
            {
                "id": "c8b55359990f89a5849813dc348d30e9e1f991bad1dcb7f82112bd35429d9b07",
                "endpoint_a": {
                    "id": "00:00:00:00:00:00:00:01:4",
                    "name": "s1-eth4",
                    "port_number": 4,
                    "mac": "0a:3f:29:da:b5:62",
                    "switch": "00:00:00:00:00:00:00:01",
                    "type": "interface",
                    "nni": true,
                    "uni": false,
                    "speed": 1250000000.0,
                    "metadata": {},
                    "lldp": true,
                    "active": true,
                    "enabled": true,
                    "status": "UP",
                    "status_reason": [],
                    "link": "c8b55359990f89a5849813dc348d30e9e1f991bad1dcb7f82112bd35429d9b07"
                },
                "endpoint_b": {
                    "id": "00:00:00:00:00:00:00:03:3",
                    "name": "s3-eth3",
                    "port_number": 3,
                    "mac": "16:2f:0c:12:70:5b",
                    "switch": "00:00:00:00:00:00:00:03",
                    "type": "interface",
                    "nni": true,
                    "uni": false,
                    "speed": 1250000000.0,
                    "metadata": {},
                    "lldp": true,
                    "active": true,
                    "enabled": true,
                    "status": "UP",
                    "status_reason": [],
                    "link": "c8b55359990f89a5849813dc348d30e9e1f991bad1dcb7f82112bd35429d9b07"
                },
                "metadata": {
                    "s_vlan": {
                        "tag_type": "vlan",
                        "value": 2
                    }
                },
                "active": true,
                "enabled": true,
                "status": "UP",
                "status_reason": []
            }
        ],
        "dynamic_backup_path": true,
        "enabled": true,
        "failover_path": [
            {
                "id": "c8b55359990f89a5849813dc348d30e9e1f991bad1dcb7f82112bd35429d9b07",
                "endpoint_a": {
                    "id": "00:00:00:00:00:00:00:01:4",
                    "name": "s1-eth4",
                    "port_number": 4,
                    "mac": "0a:3f:29:da:b5:62",
                    "switch": "00:00:00:00:00:00:00:01",
                    "type": "interface",
                    "nni": true,
                    "uni": false,
                    "speed": 1250000000.0,
                    "metadata": {},
                    "lldp": true,
                    "active": true,
                    "enabled": true,
                    "status": "UP",
                    "status_reason": [],
                    "link": "c8b55359990f89a5849813dc348d30e9e1f991bad1dcb7f82112bd35429d9b07"
                },
                "endpoint_b": {
                    "id": "00:00:00:00:00:00:00:03:3",
                    "name": "s3-eth3",
                    "port_number": 3,
                    "mac": "16:2f:0c:12:70:5b",
                    "switch": "00:00:00:00:00:00:00:03",
                    "type": "interface",
                    "nni": true,
                    "uni": false,
                    "speed": 1250000000.0,
                    "metadata": {},
                    "lldp": true,
                    "active": true,
                    "enabled": true,
                    "status": "UP",
                    "status_reason": [],
                    "link": "c8b55359990f89a5849813dc348d30e9e1f991bad1dcb7f82112bd35429d9b07"
                },
                "metadata": {
                    "s_vlan": {
                        "tag_type": "vlan",
                        "value": 1
                    }
                },
                "active": true,
                "enabled": true,
                "status": "UP",
                "status_reason": []
            }
        ],
        "id": "c9f71897abd243",
        "metadata": {},
        "name": "inter_evpl",
        "primary_path": [],
        "service_level": 6,
        "uni_a": {
            "tag": {
                "tag_type": "vlan",
                "value": 100
            },
            "interface_id": "00:00:00:00:00:00:00:01:1"
        },
        "uni_z": {
            "tag": {
                "tag_type": "vlan",
                "value": 100
            },
            "interface_id": "00:00:00:00:00:00:00:03:1"
        },
        "sb_priority": null,
        "execution_rounds": 0,
        "owner": null,
        "queue_id": -1,
        "primary_constraints": {},
        "secondary_constraints": {},
        "primary_links": [],
        "backup_links": [],
        "start_date": "2024-06-06T10:41:05",
        "creation_time": "2024-06-06T10:41:05",
        "request_time": "2024-06-06T10:41:05",
        "end_date": null,
        "flow_removed_at": "2024-06-06T10:48:04",
        "updated_at": "2024-06-06T10:48:04"
    }
}
viniarck commented 3 months ago

Leaving this as priority_medium to be on the radar for trying to reproduce it.