PAP ignores the PDP_STATUS update events from the PDPs at first time
Description
Environment
Activity

guru raja 3 days ago
Changin timer values is not solving this issueand I don’t think this bug depends on timers.

Adam Kenihan April 3, 2025 at 2:06 PM
Adheli and I tried to debug this together as he also was solving which seemed to be a similar issue. We think it may an issue with the PapParameters.yaml as outlined in the comment here: https://lf-onap.atlassian.net/browse/POLICY-5323?focusedCommentId=82709. Please check if his solution also fixes this.

guru raja February 26, 2025 at 9:52 AM
in docker compose where things are working both KAFKA-source-policy-heartbeat, KAFKA-source-policy-pdp-pap receive the same registration message. Either of them has the listener hence it works.
in cluster KAFKA-source-policy-heartbeat and KAFKA-source-policy-pdp-pap read different messages one from xacml and another from opa.
only one of them has the listener in below example KAFKA-source-policy-pdp-pap is not having listener. and process stops here.
[2025-02-17T07:30:05.622+00:00|INFO|network|KAFKA-source-policy-heartbeat] [IN|KAFKA|policy-heartbeat]
{"pdpType":"xacml","state":"ACTIVE","healthy":"HEALTHY","policies":[],"messageName":"PDP_STATUS","requestId":"8d707318-e345-4307-89cd-f931d489fe26","timestampMs":1739777405607,"name":"xacml-0ef8535e-061f-420e-9cd3-79dabd5297de","pdpGroup":"defaultGroup","pdpSubgroup":"xacml"}
[2025-02-17T07:30:10.779+00:00|INFO|network|KAFKA-source-policy-pdp-pap] [IN|KAFKA|policy-pdp-pap]
{"messageName":"PDP_STATUS","pdpType":"opa","state":"PASSIVE","healthy":"HEALTHY","description":"Pdp Status Registration Message","response":null,"policies":null,"name":"opa-d4cea440-cc78-4d5f-b537-84a765d6fdf9","requestId":"d0512434-e8ec-4528-9316-8ed9a2b74f4c","pdpGroup":"opaGroup","pdpSubgroup":null,"timestampMs":"1739777410729","deploymentInstanceInfo":""}
[2025-02-17T07:30:10.782+00:00|INFO|RequestIdDispatcher|KAFKA-source-policy-pdp-pap] no listeners for autonomous message of type PdpStatus
Details
Assignee
UnassignedUnassignedReporter
Ramesh Murugan IyerRamesh Murugan IyerComponents
Fix versions
Affects versions
Priority
Medium
Details
Details
Assignee
Reporter

When pdps sent a status update after the resgitration, the first event seems to be ignored by the pap and eventually the further events are consumed. Below is the example log from xacml-pdp
[2025-01-31T06:31:51.787+00:00|INFO|ServiceManager|KAFKA-source-policy-heartbeat] xacml-6dc3270a-c36f-4da9-b0a1-b66f9dd3fc09 PdpUpdate started
[2025-01-31T06:31:51.792+00:00|INFO|network|Thread-7] [OUT|KAFKA|policy-pdp-pap]
{"source":"pap-a311ca8c-b693-4a0f-8add-9942c1dc3922","pdpHeartbeatIntervalMs":12000000,"policiesToBeDeployed":[],"messageName":"PDP_UPDATE","requestId":"a5516c84-848a-4642-9be7-d2445d7e0ae4","timestampMs":1738305111744,"name":"xacml-6dc3270a-c36f-4da9-b0a1-b66f9dd3fc09","pdpGroup":"defaultGroup","pdpSubgroup":"xacml"}
[2025-01-31T06:31:51.912+00:00|INFO|network|KAFKA-source-policy-pdp-pap] [IN|KAFKA|policy-pdp-pap]
{"source":"pap-a311ca8c-b693-4a0f-8add-9942c1dc3922","pdpHeartbeatIntervalMs":12000000,"policiesToBeDeployed":[],"messageName":"PDP_UPDATE","requestId":"a5516c84-848a-4642-9be7-d2445d7e0ae4","timestampMs":1738305111744,"name":"xacml-6dc3270a-c36f-4da9-b0a1-b66f9dd3fc09","pdpGroup":"defaultGroup","pdpSubgroup":"xacml"}
[2025-01-31T06:31:51.912+00:00|INFO|MessageTypeDispatcher|KAFKA-source-policy-pdp-pap] discarding event of type PDP_UPDATE
[2025-01-31T06:31:51.953+00:00|INFO|network|KAFKA-source-policy-heartbeat] [IN|KAFKA|policy-heartbeat]
{"pdpType":"xacml","state":"PASSIVE","healthy":"HEALTHY","policies":[],"response":{"responseTo":"a5516c84-848a-4642-9be7-d2445d7e0ae4","responseStatus":"SUCCESS"},"messageName":"PDP_STATUS","requestId":"721db3a6-ca2f-47e1-bcfd-336a8352e2ff","timestampMs":1738305111931,"name":"xacml-6dc3270a-c36f-4da9-b0a1-b66f9dd3fc09","pdpGroup":"defaultGroup","pdpSubgroup":"xacml"}
[2025-01-31T06:31:51.954+00:00|INFO|RequestIdDispatcher|KAFKA-source-policy-heartbeat] no listener for request id a5516c84-848a-4642-9be7-d2445d7e0ae4
After 50 min, the same request was retried, but still it couldn't ascertain the update
[2025-01-31T07:21:51.787+00:00|INFO|ServiceManager|Thread-9] xacml-6dc3270a-c36f-4da9-b0a1-b66f9dd3fc09 PdpUpdate started
[2025-01-31T07:21:51.787+00:00|INFO|TimerManager|Thread-9] update timer waiting 546778ms Timer [name=3d8a4420-b1c4-4ad0-b1cf-328fa418e622, expireMs=1738308658565]
[2025-01-31T07:21:51.788+00:00|INFO|network|Thread-7] [OUT|KAFKA|policy-pdp-pap]
{"source":"pap-a311ca8c-b693-4a0f-8add-9942c1dc3922","pdpHeartbeatIntervalMs":12000000,"policiesToBeDeployed":[],"messageName":"PDP_UPDATE","requestId":"a5516c84-848a-4642-9be7-d2445d7e0ae4","timestampMs":1738305111744,"name":"xacml-6dc3270a-c36f-4da9-b0a1-b66f9dd3fc09","pdpGroup":"defaultGroup","pdpSubgroup":"xacml"}
[2025-01-31T07:21:51.811+00:00|INFO|network|KAFKA-source-policy-heartbeat] [IN|KAFKA|policy-heartbeat]
{"source":"pap-a311ca8c-b693-4a0f-8add-9942c1dc3922","pdpHeartbeatIntervalMs":12000000,"policiesToBeDeployed":[],"messageName":"PDP_UPDATE","requestId":"a5516c84-848a-4642-9be7-d2445d7e0ae4","timestampMs":1738305111744,"name":"xacml-6dc3270a-c36f-4da9-b0a1-b66f9dd3fc09","pdpGroup":"defaultGroup","pdpSubgroup":"xacml"}
[2025-01-31T07:21:51.811+00:00|INFO|MessageTypeDispatcher|KAFKA-source-policy-heartbeat] discarding event of type PDP_UPDATE
[2025-01-31T07:21:51.849+00:00|INFO|network|KAFKA-source-policy-heartbeat] [IN|KAFKA|policy-heartbeat]
{"pdpType":"xacml","state":"PASSIVE","healthy":"HEALTHY","policies":[],"response":{"responseTo":"a5516c84-848a-4642-9be7-d2445d7e0ae4","responseStatus":"SUCCESS"},"messageName":"PDP_STATUS","requestId":"e6fc0f90-a1c5-420c-ba7a-8dc43abeff96","timestampMs":1738308111813,"name":"xacml-6dc3270a-c36f-4da9-b0a1-b66f9dd3fc09","pdpGroup":"defaultGroup","pdpSubgroup":"xacml"}
[2025-01-31T07:21:51.849+00:00|INFO|RequestIdDispatcher|KAFKA-source-policy-heartbeat] no listener for request id a5516c84-848a-4642-9be7-d2445d7e0ae4
Likewise it retried two more times and then it could confirm the update