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

[4.21] Jobset operator failed to launch the jobset controller with error : undefined field 'namespace'

    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Moderate
    • None
    • None
    • None
    • None
    • In Progress
    • Bug Fix
    • Hide
      Before this update, the `oc adm restart-kubelet` and `oc adm copy-to-node` commands were subject to the cluster-wide `defaultNodeSelector`, which often restricted administrative pods to specific node types. This limitation frequently caused these critical maintenance commands to fail or become unschedulable on the intended target nodes. With this release, the logic has been updated to clear the `openshift.io/node-selector` annotation, effectively disabling the `defaultNodeSelector` for these specific operations. As a result, these administrative commands can now bypass global scheduling restrictions and execute successfully on any node in the cluster, regardless of the default configuration. (link:https://issues.redhat.com/browse/OCPBUGS-76499[OCPBUGS-76499])
      Show
      Before this update, the `oc adm restart-kubelet` and `oc adm copy-to-node` commands were subject to the cluster-wide `defaultNodeSelector`, which often restricted administrative pods to specific node types. This limitation frequently caused these critical maintenance commands to fail or become unschedulable on the intended target nodes. With this release, the logic has been updated to clear the `openshift.io/node-selector` annotation, effectively disabling the `defaultNodeSelector` for these specific operations. As a result, these administrative commands can now bypass global scheduling restrictions and execute successfully on any node in the cluster, regardless of the default configuration. (link: https://issues.redhat.com/browse/OCPBUGS-76499 [ OCPBUGS-76499 ])

      Description of problem:

      JobSet operator failed to launch the jobset controller and show error :

       

      E0203 08:15:58.776196       1 base_controller.go:279] "Unhandled Error" err=<	TargetConfigController reconciliation failed: CustomResourceDefinition.apiextensions.k8s.io "jobsets.jobset.x-k8s.io" is invalid: spec.validation.openAPIV3Schema.properties[spec].properties[volumeClaimPolicies].items.x-kubernetes-validations[0].rule: Invalid value: apiextensions.ValidationRule{Rule:"self.templates.all(t, !has(t.metadata.namespace) || size(t.metadata.namespace) == 0)", Message:"namespace cannot be set for VolumeClaimPolicies templates", MessageExpression:"", Reason:(*apiextensions.FieldValueErrorReason)(nil), FieldPath:"", OptionalOldSelf:(*bool)(nil)}: compilation failed: ERROR: <input>:1:27: undefined field 'namespace'	 | self.templates.all(t, !has(t.metadata.namespace) || size(t.metadata.namespace) == 0)	 | ..........................^	ERROR: <input>:1:68: undefined field 'namespace'	 | self.templates.all(t, !has(t.metadata.namespace) || size(t.metadata.namespace) == 0)	 | ...................................................................^ 

       

       

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

      • 4.21 main branch

      How reproducible:

      Always

      Steps to Reproduce:

      Step1. Build the jobset operator with main branch .

      Step2. Build the operand image.

      Step3. Apply the manifests from deploy directory

      Actual results:

      The jobset operator failed with error:

      E0203 08:15:58.776196       1 base_controller.go:279] "Unhandled Error" err=<	TargetConfigController reconciliation failed: CustomResourceDefinition.apiextensions.k8s.io "jobsets.jobset.x-k8s.io" is invalid: spec.validation.openAPIV3Schema.properties[spec].properties[volumeClaimPolicies].items.x-kubernetes-validations[0].rule: Invalid value: apiextensions.ValidationRule{Rule:"self.templates.all(t, !has(t.metadata.namespace) || size(t.metadata.namespace) == 0)", Message:"namespace cannot be set for VolumeClaimPolicies templates", MessageExpression:"", Reason:(*apiextensions.FieldValueErrorReason)(nil), FieldPath:"", OptionalOldSelf:(*bool)(nil)}: compilation failed: ERROR: <input>:1:27: undefined field 'namespace'	 | self.templates.all(t, !has(t.metadata.namespace) || size(t.metadata.namespace) == 0)	 | ..........................^	ERROR: <input>:1:68: undefined field 'namespace'	 | self.templates.all(t, !has(t.metadata.namespace) || size(t.metadata.namespace) == 0)	 | ...................................................................^
       

      Expected results:

      Can run with no errors.

      Additional information:

       

              fkrepins@redhat.com Filip Krepinsky
              yinzhou@redhat.com Ying Zhou
              None
              None
              Ying Zhou Ying Zhou
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: