-
Bug
-
Resolution: Done-Errata
-
Normal
-
4.15.z
Description of problem:
When creating an ImageDigestMirrorSet with conflicting mirrorSourcePolicy, it didn't prompt error.
Version-Release number of selected component (if applicable):
% oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.15.0-0.nightly-2024-01-14-100410 True False 27m Cluster version is 4.15.0-0.nightly-2024-01-14-100410
How reproducible:
always
Steps to Reproduce:
1. create an ImageContentSourcePolicy ImageContentSourcePolicy.yaml: apiVersion: operator.openshift.io/v1alpha1 kind: ImageContentSourcePolicy metadata: name: ubi8repo spec: repositoryDigestMirrors: - mirrors: - example.io/example/ubi-minimal - example.com/example/ubi-minimal source: registry.access.redhat.com/ubi6/ubi-minimal - mirrors: - mirror.example.net source: registry.example.com/example 2.After the mcp finish updating, check the /etc/containers/registries.conf update as expected 3.create an ImageDigestMirrorSet with conflicting mirrorSourcePolicy for the same source "registry.example.com/example" ImageDigestMirrorSet-conflict.yaml: apiVersion: config.openshift.io/v1 kind: ImageDigestMirrorSet metadata: name: digest-mirror spec: imageDigestMirrors: - mirrors: - example.io/example/ubi-minimal - example.com/example/ubi-minimal source: registry.access.redhat.com/ubi8/ubi-minimal mirrorSourcePolicy: AllowContactingSource - mirrors: - mirror.example.net source: registry.example.com/example mirrorSourcePolicy: NeverContactSource
Actual results:
3. create successfully, but the mcp didn't get updated and no relevant mc generated. The machine-config-controller log showed: I0116 02:34:03.897335 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: conflicting mirrorSourcePolicy is set for the same source "registry.example.com/example" in imagedigestmirrorsets and/or imagetagmirrorsets
Expected results:
3. it should prompt: there exist conflicting mirrorSourcePolicy for the same source "registry.example.com/example" in ICSP
Additional info:
- blocks
-
OCPBUGS-27436 It should deny creating an ImageDigestMirrorSet with conflicting mirrorSourcePolicy
- Closed
- is cloned by
-
OCPBUGS-27436 It should deny creating an ImageDigestMirrorSet with conflicting mirrorSourcePolicy
- Closed
- links to
-
RHBA-2024:4156 OpenShift Container Platform 4.16.z bug fix update