Comment 4 for bug 1991793

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ptp-notification-armada-app (master)

Reviewed: https://review.opendev.org/c/starlingx/ptp-notification-armada-app/+/860494
Committed: https://opendev.org/starlingx/ptp-notification-armada-app/commit/4c58b9e8b333e2ca6fe95368bf9301cff21192dd
Submitter: "Zuul (22348)"
Branch: master

commit 4c58b9e8b333e2ca6fe95368bf9301cff21192dd
Author: Douglas Henrique Koerich <email address hidden>
Date: Wed Oct 5 16:06:05 2022 -0300

    Update name of service node to pull PTP status

    Since neither in PTP notification API v1 or v2 the pull of PTP state:
    https://docs.starlingx.io/api-ref/ptp-notification-armada-app/api_ptp_notifications_definition_v1.html#pull-status-notifications
    https://docs.starlingx.io/api-ref/ptp-notification-armada-app/api_ptp_notifications_definition_v2.html#pull-status-notifications
    contains the name or address of the node running the PTP tracking
    service, in the scenario where that service (server) moves to another
    node while the sidecar (client) remains in the original node where the
    service was running before, further attempts to pull the PTP state
    fail with "404 Not Found".

    This change stores in the (now shared among threads) daemon context the
    node where service is running, and updates with latest location event
    triggered at notification worker.
    Instead of taking the residing node of sidecar ("THIS_NODE_NAME"), it
    reads the node name from the context to call the GET method of API.

    Test Plan:
    PASS: Installed new version of sidecar image and changed location of
          service, pulling PTP state with success before and after move.

    Closes-Bug: #1991793
    Signed-off-by: Douglas Henrique Koerich <email address hidden>
    Change-Id: Ie3f72c5b84f1d9093d6ee906bbc11f9fd4ceb31b