Closed viniarck closed 1 year ago
Good to see the cause of the error @viniarck.
Now, when there is no link at the endpoint found, None is returned, which will result in a last
type (Success trace).
My question is: Should it happen when there is no endpoint?
I can work it out now if you think it fixes the error.
Good to see the cause of the error @viniarck. Now, when there is no link at the endpoint found, None is returned, which will result in a
last
type (Success trace). My question is: Should it happen when there is no endpoint?I can work it out now if you think it fixes the error.
When this happens, it should be considered an incomplete
trace and not a last
type sucess, since currently sdntrace_cp is expecting to find an existing interface/link to derive the in_port
given an outgoing port, so if you don't have information to derive the port you can't assume that it's a successful trace. I suppose it should be equivalent to when trace_step
early returns if not flow or not port: return None
(which also results in the incomplete
) case, right?
I managed to find the root cause of the bug that @gretelliz and I were discussing on this review/comment. It turns out that it's a very specific bug related to a corner case that's been around for years in the code base. In summary,
find_endpont(switch, port)
when callingswitch.get_interface_by_port_no(port)
it's always assuming that the interface will be found, which in most cases will be true, but there's cases such as when OpenFlow port description hasn't been received yet and it's a new topology that hasn't been loaded from DB, then it can result in this issue. So, it needs to handle the case when the interface isn't found.For the record here's the traceback:
@gretelliz can you add this to your radar for
2023.1
version? Thanks.