Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: liveness needs to also register_status_reason_func #110

Open
viniarck opened this issue Nov 7, 2024 · 0 comments · May be fixed by #111
Open

bug: liveness needs to also register_status_reason_func #110

viniarck opened this issue Nov 7, 2024 · 0 comments · May be fixed by #111
Assignees
Labels
2024.2 Kytos-ng 2024.2 bug Something isn't working priority_medium Medium priority

Comments

@viniarck
Copy link
Member

viniarck commented Nov 7, 2024

liveness is only registering register_status_func, and not register_status_reason_func, so only status keeps coherent, status_reason when liveness is down would be empty:

{
      "id": "4d42dc0852278accac7d9df15418f6d921db160b13d674029a87cef1b5f67f30",
      "endpoint_a": {
        "id": "00:00:00:00:00:00:00:02:3",
        "name": "s2-eth3",
        "port_number": 3,
        "mac": "66:b8:72:6c:e5:29",
        "switch": "00:00:00:00:00:00:00:02",
        "type": "interface",
        "nni": true,
        "uni": false,
        "speed": 1250000000.0,
        "metadata": {},
        "lldp": true,
        "active": true,
        "enabled": true,
        "status": "UP",
        "status_reason": [],
        "link": "4d42dc0852278accac7d9df15418f6d921db160b13d674029a87cef1b5f67f30"
      },
      "endpoint_b": {
        "id": "00:00:00:00:00:00:00:03:2",
        "name": "s3-eth2",
        "port_number": 2,
        "mac": "ce:fe:1c:d8:af:95",
        "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": "4d42dc0852278accac7d9df15418f6d921db160b13d674029a87cef1b5f67f30"
      },
      "metadata": {
        "last_status_change": 1730991066.607008,
        "last_status_is_active": true,
        "notified_up_at": "2024-11-07T14:51:16.617087+00:00",
        "liveness_status": "down"
      },
      "active": true,
      "enabled": true,
      "status": "DOWN",
      "status_reason": []
    }

In terms of handling link_down|link_up notifications it's still correct, but if any application were relying only on "status_reason" here it would be a problem. That's why it's also recommended to always check if status is coherent too.

Overtime we added this option to register the reason, but it ended up left behind here for of_lldp

@viniarck viniarck added bug Something isn't working priority_medium Medium priority 2024.2 Kytos-ng 2024.2 labels Nov 7, 2024
@viniarck viniarck self-assigned this Nov 7, 2024
@viniarck viniarck linked a pull request Nov 7, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2024.2 Kytos-ng 2024.2 bug Something isn't working priority_medium Medium priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant