telstra/open-kilda

Manual reroute: Regular Flow (bandwidth:0, ignoreBandwidth:true): Northbound response contains rerouted=false, but the flow was reroute successfully.

Closed this issue · 1 comments

Manual reroute(northbound API) of a regular flow with bandwidth:0 and ignoreBandwidth:true contains rerouted=false when actual reroute is triggered and successfully executed.

Expected behaviour: Northbound response should contain rerouted=true as reroute has been triggered.

Details:
API call to call manual reroute with
header[correlation_id:“fn-tests-9600c84f-136e-41fe-9b99-32ad8e74dbf2”]
Response :

FlowRerouteResponseV2(flowId=07Jun143706_299_cardamom1228_flow,
 path=FlowPathV2(latency=5204, nodes=[FlowPathV2.PathNodeV2(switchId=00:00:00:00:00:00:00:02, portNo=5, segmentLatency=null), 
 FlowPathV2.PathNodeV2(switchId=00:00:00:00:00:00:00:08, portNo=1, segmentLatency=null)]), 
 rerouted=false)

History details:

{
    "clazz": "org.openkilda.messaging.payload.history.FlowHistoryEntry",
    "flow_id": "07Jun143706_299_cardamom1228_flow",
    "timestamp": 1717763838,
    "timestamp_iso": "2024-06-07T12:37:18.482Z",
    "actor": "AUTO",
    "action": "Flow rerouting",
    "task_id": "62459fad-d377-4960-a466-8c739d01a441 : fn-tests-9600c84f-136e-41fe-9b99-32ad8e74dbf2",
    "details": "Reason: initiated via Northbound",
    "payload": [
      {
        "timestamp": 1717763838,
        "action": "Flow rerouting operation has been started.",
        "details": null,
        "timestamp_iso": "2024-06-07T12:37:18.482Z"
      },
      {
        "timestamp": 1717763838,
        "action": "The flow has been validated successfully",
        "details": null,
        "timestamp_iso": "2024-06-07T12:37:18.489Z"
      },
      {
        "timestamp": 1717763838,
        "action": "Found the same primary path. Skipped creating of it",
        "details": null,
        "timestamp_iso": "2024-06-07T12:37:18.522Z"
      },
      {
        "timestamp": 1717763838,
        "action": "New protected paths were created",
        "details": "The flow paths 07Jun143706_299_cardamom1228_flow_ebec35c7-998b-409c-98df-72543bb3bc38 / 07Jun143706_299_cardamom1228_flow_d3508be7-4813-4163-a771-706c6e40b86e were created (with allocated resources)",
        "timestamp_iso": "2024-06-07T12:37:18.570Z"
      },
      {
        "timestamp": 1717763838,
        "action": "Commands for installing non ingress rules have been sent",
        "details": null,
        "timestamp_iso": "2024-06-07T12:37:18.605Z"
      },
      ...
      {
        "timestamp": 1717763839,
        "action": "The flow status was set to UP",
        "details": null,
        "timestamp_iso": "2024-06-07T12:37:19.497Z"
      },
      {
        "timestamp": 1717763839,
        "action": "Flow was rerouted successfully",
        "details": null,
        "timestamp_iso": "2024-06-07T12:37:19.500Z"
      }
    ],

TC to reproduce the issue(flaky):
ProtectedPathSpec#System reroutes an unmetered flow to more preferable path and ignores protected path when reroute is intentional
System reroutes an unmetered flow to more preferable path and ignores protected path when reroute is intentional
rerouteIssueFullHistory.json

Issue solved with the latest develop.