-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
4.17
-
Moderate
-
None
-
CNF RAN Sprint 264
-
1
-
False
-
-
Release Note Not Required
-
In Progress
-
This is a clone of issue OCPBUGS-46150. The following is the description of the original issue:
—
If a consumer subscribes to an event using the PTP event api v2, when a new consumer wants to subscribe to the same events it is not possible. A HTTP 409 Conflict response is received by the second consumer and no change events are received.
Test Steps:
- Deploy ptp-operator with v2 event
- Deploy a consumer and subscribe to an event
- Deploy a second consumer and subscribe to the same event or events.
Result:
The first consumer subscribes successfully and here we have a list of available subscriptions. Also the consumer is able to query the PTP event API to check the healthstatus and the currentStates of each subscription.
[ { "ResourceAddress": "/cluster/node/snonode.sno-worker-01.inbound-int.se-lab.eng.rdu2.dc.redhat.com/sync/ptp-status/lock-state", "EndpointUri": "http://10.6.85.1:9043/event", "SubscriptionId": "f681ad15-85c7-412f-a8a4-0d7c4f6cd809", "UriLocation": "http://ptp-event-publisher-service-snonode.openshift-ptp.svc.cluster.local:9043/api/ocloudNotifications/v2/subscriptions/f681ad15-85c7-412f-a8a4-0d7c4f6cd809" }, { "ResourceAddress": "/cluster/node/snonode.sno-worker-01.inbound-int.se-lab.eng.rdu2.dc.redhat.com/sync/gnss-status/gnss-sync-status", "EndpointUri": "http://10.6.85.1:9043/event", "SubscriptionId": "ae6b541a-243f-4c4c-a290-d1c14c5d69a7", "UriLocation": "http://ptp-event-publisher-service-snonode.openshift-ptp.svc.cluster.local:9043/api/ocloudNotifications/v2/subscriptions/ae6b541a-243f-4c4c-a290-d1c14c5d69a7" }, { "ResourceAddress": "/cluster/node/snonode.sno-worker-01.inbound-int.se-lab.eng.rdu2.dc.redhat.com/sync/sync-status/sync-state", "EndpointUri": "http://10.6.85.1:9043/event", "SubscriptionId": "aa706acd-0816-42cb-b576-360b9617388f", "UriLocation": "http://ptp-event-publisher-service-snonode.openshift-ptp.svc.cluster.local:9043/api/ocloudNotifications/v2/subscriptions/aa706acd-0816-42cb-b576-360b9617388f" }, { "ResourceAddress": "/cluster/node/snonode.sno-worker-01.inbound-int.se-lab.eng.rdu2.dc.redhat.com/sync/sync-status/os-clock-sync-state", "EndpointUri": "http://10.6.85.1:9043/event", "SubscriptionId": "eb1199b3-ea20-44cc-8ce9-0be409d998cf", "UriLocation": "http://ptp-event-publisher-service-snonode.openshift-ptp.svc.cluster.local:9043/api/ocloudNotifications/v2/subscriptions/eb1199b3-ea20-44cc-8ce9-0be409d998cf" }, { "ResourceAddress": "/cluster/node/snonode.sno-worker-01.inbound-int.se-lab.eng.rdu2.dc.redhat.com/sync/ptp-status/clock-class", "EndpointUri": "http://10.6.85.1:9043/event", "SubscriptionId": "5c4a977b-c284-430c-813e-36d1a0db2828", "UriLocation": "http://ptp-event-publisher-service-snonode.openshift-ptp.svc.cluster.local:9043/api/ocloudNotifications/v2/subscriptions/5c4a977b-c284-430c-813e-36d1a0db2828" } ]
Then, deploy another consumer and try to subscribe to the same events. In this case thee logs of the consumer shows that the subscription already exists:
$ oc logs -f cloud-consumer-deployment-649d585c84-2826z time="2024-12-10T16:17:48Z" level=info msg="transport host path is set to ptp-event-publisher-service-snonode.openshift-ptp.svc.cluster.local:9043" time="2024-12-10T16:17:48Z" level=info msg="apiVersion=2.0, updated apiAddr=ptp-event-publisher-service-snonode.openshift-ptp.svc.cluster.local:9043, apiPath=/api/ocloudNotifications/v2/" time="2024-12-10T16:17:48Z" level=info msg="Starting local API listening to :9043" time="2024-12-10T16:17:53Z" level=info msg="transport host path is set to ptp-event-publisher-service-snonode.openshift-ptp.svc.cluster.local:9043" time="2024-12-10T16:17:53Z" level=info msg="checking for rest service health" time="2024-12-10T16:17:53Z" level=info msg="health check http://ptp-event-publisher-service-snonode.openshift-ptp.svc.cluster.local:9043/api/ocloudNotifications/v2/health" time="2024-12-10T16:17:53Z" level=info msg="rest service returned healthy status" time="2024-12-10T16:17:53Z" level=info msg="healthy publisher; subscribing to events" time="2024-12-10T16:17:53Z" level=error msg="failed to create subscription: api at http://ptp-event-publisher-service-snonode.openshift-ptp.svc.cluster.local:9043/api/ocloudNotifications/v2/subscriptions returned status 409 for /cluster/node/snonode.sno-worker-01.inbound-int.se-lab.eng.rdu2.dc.redhat.com/sync/sync-status/os-clock-sync-state" time="2024-12-10T16:17:53Z" level=error msg="failed to create subscription: api at http://ptp-event-publisher-service-snonode.openshift-ptp.svc.cluster.local:9043/api/ocloudNotifications/v2/subscriptions returned status 409 for /cluster/node/snonode.sno-worker-01.inbound-int.se-lab.eng.rdu2.dc.redhat.com/sync/ptp-status/clock-class" time="2024-12-10T16:17:53Z" level=error msg="failed to create subscription: api at http://ptp-event-publisher-service-snonode.openshift-ptp.svc.cluster.local:9043/api/ocloudNotifications/v2/subscriptions returned status 409 for /cluster/node/snonode.sno-worker-01.inbound-int.se-lab.eng.rdu2.dc.redhat.com/sync/ptp-status/lock-state" time="2024-12-10T16:17:53Z" level=error msg="failed to create subscription: api at http://ptp-event-publisher-service-snonode.openshift-ptp.svc.cluster.local:9043/api/ocloudNotifications/v2/subscriptions returned status 409 for /cluster/node/snonode.sno-worker-01.inbound-int.se-lab.eng.rdu2.dc.redhat.com/sync/gnss-status/gnss-sync-status" time="2024-12-10T16:17:53Z" level=error msg="failed to create subscription: api at http://ptp-event-publisher-service-snonode.openshift-ptp.svc.cluster.local:9043/api/ocloudNotifications/v2/subscriptions returned status 409 for /cluster/node/snonode.sno-worker-01.inbound-int.se-lab.eng.rdu2.dc.redhat.com/sync/sync-status/sync-state" time="2024-12-10T16:17:53Z" level=info msg="publisher endpoint updated from ptp-event-publisher-service-NODE_NAME.openshift-ptp.svc.cluster.local:9043 to ptp-event-publisher-service-snonode.openshift-ptp.svc.cluster.local:9043 healthStatusOk true" time="2024-12-10T16:17:53Z" level=info msg="waiting for events"
Note that the requests sent by this consumer (healthckeck and currentstate) are still working.
Expected Result:
Two or more consumers can subscribe and receive the same PTP events when there is a change in the PTP operator.
- is blocked by
-
OCPBUGS-46150 Unable to subscribe two or more consumers to the same PTP event
- Verified
- is depended on by
-
OCPBUGS-47791 Unable to subscribe two or more consumers to the same PTP event
- Closed
- links to
-
RHEA-2024:6122 OpenShift Container Platform 4.18.z bug fix update