Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-32137

PTP consumer deployed with sidecar cannot get PTP events on getCurrentState call

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 4.12.z, 4.16
    • Networking / ptp
    • No
    • CNF Ran Sprint 252
    • 1
    • False
    • Hide

      None

      Show
      None
    • Release Note Not Required
    • In Progress
    • Hide
      4/4: Dev build shared with customer, awaiting test results
      3/28: Consumer App updated to verify this bug; reached to customer if they can take dev build for a spin
      Show
      4/4: Dev build shared with customer, awaiting test results 3/28: Consumer App updated to verify this bug; reached to customer if they can take dev build for a spin

      This is a clone of issue OCPBUGS-31667. The following is the description of the original issue:

      This is a clone of issue OCPBUGS-30209. The following is the description of the original issue:

      Description of problem:

      How to reproduce 
      1. Disable Event Publication:
              In the PTP Operator, navigate to the PtpOperatorConfig.
              Set the enableEventPublisher field to false to stop publishing sync events.
      
        2.  Deploy or Restart PTP Sync Monitor:
              Deploy or restart the PTP Sync Monitor, the client application and call create subscription or create subscription for events via consumer sidecar API 
      
          3. Monitor Sync State:
              Observe that the PTP Sync Monitor fails to retrieve the current state, assuming no sync source is available. It transitions to the FREERUN state.
      
         4. Wait for 5 Minutes:
              Allow 5 minutes to pass to ensure the system stabilizes in the FREERUN state.
      
         5. Enable Event Publication:
              In the PTP Operator, modify the PtpOperatorConfig.
              Set the enableEventPublisher field to true to resume publishing sync events.
      
          6. Manual Intervention if Sync Monitor Doesn't Recover:
              Unfortunately, the PTP Sync Monitor may not recover automatically.
              Manual intervention is required; restart the Pod associated with the PTP Sync Monitor.
      *Issue found *
        *  Subscription Persistence Issues:*
              If a consumer subscribes to events with PTP enabled and faces issues persisting the subscription information at the producer's side, it leads to complications.
              Upon the return of the producer with Event enabled, the consumer cannot subscribe to the same events due to locally persisted subscription information.
      
      *    Workaround for Subscription Persistence Issues:*
              To resolve the issue, the consumer must delete the locally persisted subscription information. After deletion, the consumer can subscribe to events again successfully.
      {code:none}
      
          

      Expected results:
      Should be able to subscribe for same events after PTP is restarted with Event enabled and has no data of any subscribers

      This fails because, when client sidecar is parsing the publisher URL at the initialization process , it is dropping the one that doesn't exist .To avoid failure while sending requests to not available endpoints .You can see the validation dropping the publisher url from the list https://github.com/redhat-cne/cloud-event-proxy/blob/51b5381dc8fea0b2f9895235288f64c8f4c3134f/cmd/main.go#L429

            jacding@redhat.com Jack Ding
            openshift-crt-jira-prow OpenShift Prow Bot
            Bonnie Block Bonnie Block
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: