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

hypershift do not accept the "remove" json patch operation

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • Customer Escalated
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

       When trying to patch a kubevirt hypershift VMI using the nodepool annotation with the expression
      
      apiVersion: hypershift.openshift.io/v1beta1
      kind: NodePool
      metadata:
        annotations:
          hypershift.openshift.io/kubevirt-vm-jsonpatch: |
            [
              {
                "op": "remove",
                "path": "/spec/template/metadata/annotations/kubevirt.io~1allow-pod-bridge-network-live-migration"
              }
            ]
      
      hypershift fails since it expectes "value" field at the expression, but that's wrong from jsonpatch spec.   

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

          4.18

      How reproducible:

          Always

      Steps to Reproduce:

          1.Create a hypershift nodepool with the following annotation
      apiVersion: hypershift.openshift.io/v1beta1 kind: NodePool metadata: annotations: hypershift.openshift.io/kubevirt-vm-jsonpatch: | [ { "op": "remove", "path": "/spec/template/metadata/annotations/kubevirt.io~1allow-pod-bridge-network-live-migration" } ]

      Actual results:

          wrong json patch structure in the "hypershift.openshift.io/kubevirt-vm-jsonpatch" annotation: operation, missing value field: missing value, <nil>

      Expected results:

          Should success and patch VMI

      Additional info:

      The issue is related to using the wrong operation validation at     https://github.com/openshift/hypershift/pull/3197

              ellorent Felix Enrique Llorente Pastora
              ellorent Felix Enrique Llorente Pastora
              None
              None
              Zheng Feng Zheng Feng
              None
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: