-
Bug
-
Resolution: Unresolved
-
Undefined
-
4.20.0
-
Quality / Stability / Reliability
-
False
-
-
None
-
Critical
-
None
-
None
-
None
-
None
-
Done
-
Release Note Not Required
-
N/A
-
None
-
None
-
None
-
None
Description of problem:
hypershift create cluster kubevirt --name cl-418-a --release-image quay.io/openshift-release-dev/ocp-release:4.18.9-x86_64 --node-pool-replicas 2 --memory 12Gi --cores 8 --root-volume-size 40 --pull-secret /home/jenkins/workspace/qe-deploy-ocs-cluster/ocs-ci/data/pull-secret --image-content-sources /tmp/icsp_mirrors-fhmmlcs9 --annotations hypershift.openshift.io/skip-release-image-validation=true --olm-catalog-placement Guest {"level":"info","ts":"2025-05-16T14:10:52-04:00","msg":"Applied Kube resource","kind":"Namespace","namespace":"","name":"clusters"} {"level":"info","ts":"2025-05-16T14:10:52-04:00","msg":"Applied Kube resource","kind":"Secret","namespace":"clusters","name":"cl-418-a-pull-secret"} {"level":"info","ts":"2025-05-16T14:10:52-04:00","msg":"Applied Kube resource","kind":"Secret","namespace":"clusters","name":"cl-418-a-etcd-encryption-key"} {"level":"error","ts":"2025-05-16T14:10:52-04:00","msg":"Failed to create cluster","error":"failed to apply object \"clusters/cl-418-a\": HostedCluster.hypershift.openshift.io \"cl-418-a\" is invalid: [spec.imageContentSources: Too many: 63: must have at most 25 items, <nil>: Invalid value: \"null\": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation]","stacktrace":"github.com/openshift/hypershift/cmd/cluster/kubevirt.NewCreateCommand.func1\n\t/tmp/tmpkmsax_nl/cmd/cluster/kubevirt/create.go:320\ngithub.com/spf13/cobra.(*Command).execute\n\t/tmp/tmpkmsax_nl/vendor/github.com/spf13/cobra/command.go:985\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/tmp/tmpkmsax_nl/vendor/github.com/spf13/cobra/command.go:1117\ngithub.com/spf13/cobra.(*Command).Execute\n\t/tmp/tmpkmsax_nl/vendor/github.com/spf13/cobra/command.go:1041\ngithub.com/spf13/cobra.(*Command).ExecuteContext\n\t/tmp/tmpkmsax_nl/vendor/github.com/spf13/cobra/command.go:1034\nmain.main\n\t/tmp/tmpkmsax_nl/main.go:78\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:283"} Error: failed to apply object "clusters/cl-418-a": HostedCluster.hypershift.openshift.io "cl-418-a" is invalid: [spec.imageContentSources: Too many: 63: must have at most 25 items, <nil>: Invalid value: "null": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation] failed to apply object "clusters/cl-418-a": HostedCluster.hypershift.openshift.io "cl-418-a" is invalid: [spec.imageContentSources: Too many: 63: must have at most 25 items, <nil>: Invalid value: "null": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation]
I can not create icsp being on that cluster too:
oc apply -f icsp-client The imagecontentsourcepolicies "df-repo-4.19.0-1750232059281" is invalid: : ValidatingAdmissionPolicy 'icsp' with binding 'icsp-binding' denied request: This resource cannot be created, updated, or deleted. Please ask your administrator to modify the resource in the HostedCluster object.
This issue repeats even after fix mentioned in this slack channel https://redhat-external.slack.com/archives/C01C8502FMM/p1747425678640129
MCE 2.9.0, hosting cluster 4.19.0, guest cluster 4.19.0
Suspicion on this file that still has limitation rule https://github.com/openshift/hypershift/blob/892474ca2fd481eeab741da377d017051256914a/api/hypershift/v1beta1/hostedcluster_types.go#L787
type ImageContentSource struct { // source is the repository that users refer to, e.g. in image pull // specifications. // // +immutable // +kubebuilder:validation:MaxLength=255 // +required Source string `json:"source"` // mirrors are one or more repositories that may also contain the same images. // // +optional // +immutable // +kubebuilder:validation:MaxItems=25 // +listType=set // +kubebuilder:validation:items:MaxLength=255 Mirrors []string `json:"mirrors,omitempty"`
Version-Release number of selected component (if applicable):
4.19.0
How reproducible:
Steps to Reproduce:
1. 2. 3.
Actual results:
limit icsp items max 25 items
Expected results:
limit icsp items max 255 items
Additional info:
cluster credentials may be provided by request