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

CNCC is missing the UserAgent in the telemetry options when authenticating to Azure Cloud

    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem

      The Cloud Network Config Controller (CNCC) is not setting the UserAgent in the Azure SDK telemetry options when creating Azure ARM SDK clients. This means Azure API requests from CNCC do not include proper application identification for request tracing and telemetry purposes.

      When authenticating to Azure Cloud, the Azure SDK's TelemetryOptions.ApplicationID is not configured, resulting in requests that cannot be properly attributed to the Cloud Network Config Controller.

      Note: CNCC has a UserAgent constant defined but currently only applies it to GCP clients, not Azure clients.

      Version-Release number of selected component (if applicable)

      4.20, 4.21, 4.22

      How reproducible

      Always

      Steps to Reproduce

      1. Deploy an OpenShift cluster on Azure
      2. Trigger network configuration operations that make Azure API calls
      3. Monitor Azure API requests from the cloud-network-config-controller
      4. Observe the User-Agent header in requests to Azure ARM APIs

      Actual results

      Azure ARM SDK requests from CNCC do not include a proper application User-Agent identifier. The requests are not easily attributable to the cloud-network-config-controller in Azure telemetry/monitoring.

      Expected results

      Azure ARM SDK requests should include a User-Agent header identifying the Cloud Network Config Controller for proper request tracing.

      Additional info

      The fix should add TelemetryOptions with ApplicationID to the Azure SDK client options in pkg/cloudprovider/azure.go:

      options := &arm.ClientOptions{
          ClientOptions: azcore.ClientOptions{
              Cloud: cloudConfig,
              Telemetry: policy.TelemetryOptions{
                  ApplicationID: UserAgent, // Already defined as "cloud-network-config-controller"
              },
          },
      }
      

      Note: The UserAgent constant is already defined in the codebase but only applied to GCP. The fix should also apply it to Azure clients.

              rh-ee-alesross Alessandro Rossi
              rh-ee-brcox Bryan Cox
              None
              None
              Wen Wang Wen Wang
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: