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

Whitespace at the end of URL in ICSP is carried over into resources conf file and results in invalid url errors

    • No
    • OCPNODE Sprint 246 (Blue), OCPNODE Sprint 247 (Blue), OCPNODE Sprint 248 (Blue)
    • 3
    • False
    • Hide

      None

      Show
      None
    • N/A
    • Release Note Not Required

      Description of problem:

          

      Version-Release number of selected component (if applicable):

          

      How reproducible:

          

      Steps to Reproduce:

          1.
          2.
          3.
          

      Actual results:

          

      Expected results:

          

      Additional info:

          

            [OCPBUGS-19427] Whitespace at the end of URL in ICSP is carried over into resources conf file and results in invalid url errors

            This bug is being closed because while it may represent a valid problem, the bug has been reported against a version no longer in support. For support lifecycle dates please refer to https://access.redhat.com/support/policy/updates/openshift#dates .

            OpenShift Jira Bot added a comment - This bug is being closed because while it may represent a valid problem, the bug has been reported against a version no longer in support. For support lifecycle dates please refer to https://access.redhat.com/support/policy/updates/openshift#dates .

            Min Li added a comment -
            % oc get clusterversion 
            NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
            version   4.16.0-0.nightly-2024-01-15-064322   True        False         4h58m   Cluster version is 4.16.0-0.nightly-2024-01-15-064322
            
            % oc create -f ICSP_whitespace.yaml 
            ICSP_whitespace.yaml :
            apiVersion: operator.openshift.io/v1alpha1
            kind: ImageContentSourcePolicy
            metadata:
              name: repo-icsp
            spec:
              repositoryDigestMirrors:
              - mirrors:
                - "example.io/cp4d-dp-xyz  "
                source: "  example.io/cp4d/dp/xyz"
            
            no generated new mc and the mcp master and worker didn't get updating. 
            
            There is log in machine-config-controller-7c6bbd8d76-4dmtd:
            I0117 09:36:49.421986       1 container_runtime_config_controller.go:417] Error syncing image config openshift-config: could not Create/Update MachineConfig: could not update registries config with new changes: invalid format for source "  example.io/cp4d/dp/xyz"
            I0117 09:36:49.525378       1 container_runtime_config_controller.go:417] Error syncing image config openshift-config: could not Create/Update MachineConfig: could not update registries config with new changes: invalid format for source "  example.io/cp4d/dp/xyz"

            Min Li added a comment - % oc get clusterversion  NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS version   4.16.0-0.nightly-2024-01-15-064322   True        False         4h58m   Cluster version is 4.16.0-0.nightly-2024-01-15-064322 % oc create -f ICSP_whitespace.yaml  ICSP_whitespace.yaml : apiVersion: operator.openshift.io/v1alpha1 kind: ImageContentSourcePolicy metadata: name: repo-icsp spec: repositoryDigestMirrors: - mirrors: - "example.io/cp4d-dp-xyz " source: " example.io/cp4d/dp/xyz" no generated new mc and the mcp master and worker didn't get updating. There is log in machine-config-controller-7c6bbd8d76-4dmtd: I0117 09:36:49.421986       1 container_runtime_config_controller.go:417] Error syncing image config openshift-config: could not Create/Update MachineConfig: could not update registries config with new changes: invalid format for source "  example.io/cp4d/dp/xyz" I0117 09:36:49.525378       1 container_runtime_config_controller.go:417] Error syncing image config openshift-config: could not Create/Update MachineConfig: could not update registries config with new changes: invalid format for source "  example.io/cp4d/dp/xyz"

            Qi Wang added a comment -

            rhn-support-minmli could you help verify this one?

            Qi Wang added a comment - rhn-support-minmli could you help verify this one?

            Hi qiwan233,

            Bugs should not be moved to Verified without first providing a Release Note Type("Bug Fix" or "No Doc Update") and for type "Bug Fix" the Release Note Text must also be provided. Please populate the necessary fields before moving the Bug to Verified.

            OpenShift Jira Bot added a comment - Hi qiwan233 , Bugs should not be moved to Verified without first providing a Release Note Type("Bug Fix" or "No Doc Update") and for type "Bug Fix" the Release Note Text must also be provided. Please populate the necessary fields before moving the Bug to Verified.

            Looks like this bug is far enough along in the workflow that a code fix is ready. Customers and support need to know the backport plan. Please complete the "Target Backport Versions" field to indicate which version(s) will receive the fix.

            OpenShift Jira Bot added a comment - Looks like this bug is far enough along in the workflow that a code fix is ready. Customers and support need to know the backport plan. Please complete the " Target Backport Versions " field to indicate which version(s) will receive the fix.

            Writing of ICSP entry into a MachineConfig is performed by container runtimeconfig controller. Moving bug to node team to asses and make necessary changes.

            Sinny Kumari added a comment - Writing of ICSP entry into a MachineConfig is performed by container runtimeconfig controller. Moving bug to node team to asses and make necessary changes.

            David Guthrie added a comment - - edited

            Hi cdoern@redhat.com,
            I disagree with this for one specific reason: when the ICSP is converted to a registries.conf and then embedded in the MC, the resulting urls are quoted strings with the whitespace embedded:

            [[registry.mirror]]
              location = "mirror.internal.example.com/4.11.41/openshift    "
            

            At that point it seems counter-intuitive to trim the whitespace.

            David Guthrie added a comment - - edited Hi cdoern@redhat.com , I disagree with this for one specific reason: when the ICSP is converted to a registries.conf and then embedded in the MC, the resulting urls are quoted strings with the whitespace embedded: [[registry.mirror]] location = "mirror.internal.example.com/4.11.41/openshift " At that point it seems counter-intuitive to trim the whitespace.

              qiwan233 Qi Wang
              rhn-support-dguthrie David Guthrie
              Min Li Min Li
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: