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

fix: registered status_reason hook for link liveness #111

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

viniarck
Copy link
Member

@viniarck viniarck commented Nov 7, 2024

Closes #110

Summary

See updated changelog file

Local Tests

  • Confirmed that status_reason had ["liveness"] on it when it went down:
{
      "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": 1731004030.0903015,
        "last_status_is_active": true,
        "notified_up_at": "2024-11-07T18:27:20.099067+00:00",
        "liveness_status": "down"
      },
      "active": true,
      "enabled": true,
      "status": "DOWN",
      "status_reason": [
        "liveness"
      ]
    }

End-to-End Tests

with this branch and the new e2e related test:

+ python3 -m pytest tests/ -k test_005_liveness_goes_down --reruns 2 -r fEr
============================= test session starts ==============================
platform linux -- Python 3.11.2, pytest-8.1.1, pluggy-1.5.0
rootdir: /builds/amlight/kytos-end-to-end-tester/kytos-end-to-end-tests
plugins: rerunfailures-13.0, timeout-2.2.0, anyio-4.3.0
collected 267 items / 266 deselected / 1 selected
tests/test_e2e_31_of_lldp.py .                                           [100%]
------------------------------- start/stop times -------------------------------
========== 1 passed, 266 deselected, 35 warnings in 91.46s (0:01:31) ===========

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: liveness needs to also register_status_reason_func
1 participant