Closed viniarck closed 1 year ago
@italovalcy originally reported this on https://github.com/kytos-ng/topology/issues/106, but then we added protection on core with this PR so topology doesn't hit the same traceback, but on mef_eline we still need to fix the root cause.
Full steps to reproduce, I'm using this ring topology:
mn --controller=remote,ip=127.0.0.1,port=6653 --switch=ovsk,protocols=OpenFlow13 --custom custom_topos/ring.py --topo mytopo
from mininet.topo import Topo
class MyTopo(Topo): "Simple topology example."
def build(self):
"Create custom topo."
# Add hosts and switches
h1 = self.addHost("h1")
h11 = self.addHost("h11")
h2 = self.addHost("h2")
h3 = self.addHost("h3")
s1 = self.addSwitch("s1")
s2 = self.addSwitch("s2")
s3 = self.addSwitch("s3")
self.addLink(h1, s1)
self.addLink(h11, s1)
self.addLink(h2, s2)
self.addLink(h3, s3)
self.addLink(s1, s2)
self.addLink(s2, s3)
self.addLink(s1, s3)
topos = {"mytopo": (lambda: MyTopo())}
- Create circuit:
echo '{ "name": "epl", "service_level": 7, "dynamic_backup_path": true, "uni_a": { "interface_id": "00:00:00:00:00:00:00:01:1" }, "uni_z": { "interface_id": "00:00:00:00:00:00:00:03:1" }, "primary_constraints": { "mandatory_metrics": { "ownership": "red" } }, "secondary_constraints": { "mandatory_metrics": { "ownership": "blue" } } }' | http localhost:8181/api/kytos/m ef_eline/v2/evc/
HTTP/1.0 201 CREATED Access-Control-Allow-Origin: * Content-Length: 32 Content-Type: application/json Date: Tue, 11 Oct 2022 14:05:10 GMT Server: Werkzeug/2.0.3 Python/3.9.12
{ "circuit_id": "eaa4b510ca3649" }
- Update the circuit with its id
echo '{ "secondary_constraints": { "mandatory_metrics": { "ownership": "blue" } }, "primary_constraints": { "mandatory_metrics": { "ownership": "red" } } }' | http PATCH localhost:8181 /api/kytos/mef_eline/v2/evc/eaa4b510ca3649
HTTP/1.0 200 OK Access-Control-Allow-Origin: * Content-Length: 3165 Content-Type: application/json Date: Tue, 11 Oct 2022 14:06:32 GMT Server: Werkzeug/2.0.3 Python/3.9.12
{ "eaa4b510ca3649": { "active": true, "archived": false, "backup_links": [], "backup_path": [], "bandwidth": 0, "circuit_scheduler": [], "creation_time": "2022-10-11T14:05:10", "current_path": [ { "active": true, "enabled": true, "endpoint_a": { "active": true, "enabled": true, "id": "00:00:00:00:00:00:00:01:3", "link": "78282c4d5b579265f04ebadc4405ca1b49628eb1d684bb45e5d0607fa8b713d0", "lldp": true, "mac": "ca:9b:0a:5f:e6:88", "metadata": {}, "name": "s1-eth3", "nni": true, "port_number": 3, "speed": 1250000000.0, "switch": "00:00:00:00:00:00:00:01", "type": "interface", "uni": false }, "endpoint_b": { "active": true, "enabled": true, "id": "00:00:00:00:00:00:00:02:2", "link": "78282c4d5b579265f04ebadc4405ca1b49628eb1d684bb45e5d0607fa8b713d0", "lldp": true, "mac": "3a:7b:ff:4c:60:a6", "metadata": {}, "name": "s2-eth2", "nni": true, "port_number": 2, "speed": 1250000000.0, "switch": "00:00:00:00:00:00:00:02", "type": "interface", "uni": false }, "id": "78282c4d5b579265f04ebadc4405ca1b49628eb1d684bb45e5d0607fa8b713d0", "metadata": { "s_vlan": { "tag_type": 1, "value": 3487 } } }, { "active": true, "enabled": true, "endpoint_a": { "active": true, "enabled": true, "id": "00:00:00:00:00:00:00:02:3", "link": "4d42dc0852278accac7d9df15418f6d921db160b13d674029a87cef1b5f67f30", "lldp": true, "mac": "36:12:4c:6c:f8:57", "metadata": {}, "name": "s2-eth3", "nni": true, "port_number": 3, "speed": 1250000000.0, "switch": "00:00:00:00:00:00:00:02", "type": "interface", "uni": false }, "endpoint_b": { "active": true, "enabled": true, "id": "00:00:00:00:00:00:00:03:2", "link": "4d42dc0852278accac7d9df15418f6d921db160b13d674029a87cef1b5f67f30", "lldp": true, "mac": "e2:a8:83:f1:76:c5", "metadata": {}, "name": "s3-eth2", "nni": true, "port_number": 2, "speed": 1250000000.0, "switch": "00:00:00:00:00:00:00:03", "type": "interface", "uni": false }, "id": "4d42dc0852278accac7d9df15418f6d921db160b13d674029a87cef1b5f67f30", "metadata": { "s_vlan": { "tag_type": 1, "value": 2232 } } } ], "dynamic_backup_path": true, "enabled": true, "end_date": null, "failover_path": [ { "active": true, "enabled": true, "endpoint_a": { "active": true, "enabled": true, "id": "00:00:00:00:00:00:00:01:4", "link": "c8b55359990f89a5849813dc348d30e9e1f991bad1dcb7f82112bd35429d9b07", "lldp": true, "mac": "96:af:8f:bd:6b:66", "metadata": {}, "name": "s1-eth4", "nni": true, "port_number": 4, "speed": 1250000000.0, "switch": "00:00:00:00:00:00:00:01", "type": "interface", "uni": false }, "endpoint_b": { "active": true, "enabled": true, "id": "00:00:00:00:00:00:00:03:3", "link": "c8b55359990f89a5849813dc348d30e9e1f991bad1dcb7f82112bd35429d9b07", "lldp": true, "mac": "e2:d2:7d:70:18:d5", "metadata": {}, "name": "s3-eth3", "nni": true, "port_number": 3, "speed": 1250000000.0, "switch": "00:00:00:00:00:00:00:03", "type": "interface", "uni": false }, "id": "c8b55359990f89a5849813dc348d30e9e1f991bad1dcb7f82112bd35429d9b07", "metadata": {} } ], "id": "eaa4b510ca3649", "metadata": {}, "name": "epl", "owner": null, "primary_constraints": { "mandatory_metrics": { "ownership": "red" } }, "primary_links": [], "primary_path": [], "queue_id": null, "request_time": "2022-10-11T14:05:10", "sb_priority": null, "secondary_constraints": { "mandatory_metrics": { "ownership": "blue" } }, "service_level": 7, "start_date": "2022-10-11T14:05:10", "uni_a": { "interface_id": "00:00:00:00:00:00:00:01:1", "tag": null }, "uni_z": { "interface_id": "00:00:00:00:00:00:00:03:1", "tag": null } } }
This is a known-issue that has been hit before, and I've just hit it again, but I think we haven't mapped on
mef_eline
:There are cases when when removing flows, after a EVC gets deployed, that tries to get the
s_vlan
metadata, but it's not there. I'll map this issue just so we can fix this, ideally in this release. I've reproduced this when I tried to update a circuit:PATCH v2/evc/circuit_id
: