Hide Forgot
Description of problem: When running `oc replace` on imagestreams we get error: magestream_controller.go:127] Error syncing image stream "openshift/jenkins": ImageStreamImport "jenkins" is invalid: spec.images: Invalid value: "null": you must specify at least one image or a repository import Version-Release number of selected component (if applicable): 3.9 How reproducible: 100% Steps to Reproduce: 1. Installer will create the imagestreams, or it can be done manually. oc create -f /usr/share/ansible/openshift-ansible/roles/openshift_examples/files/examples/v3.9/image-streams/image-streams-rhel7.json -n openshift 2. oc replace -f /usr/share/ansible/openshift-ansible/roles/openshift_examples/files/examples/v3.9/image-streams/image-streams-rhel7.json -n openshift Actual results: # journalctl -u atomic-openshift-master-controllers | grep imagestream_controller Error logs on all replaced imagestreams: imagestream_controller.go:127] Error syncing image stream "openshift/jenkins": ImageStreamImport "jenkins" is invalid: spec.images: Invalid value: "null": you must specify at least one image or a repository import Expected results: For the replace to work and the controller to not error trying to import these. Additional info: Error message is generated here: https://github.com/openshift/origin/blob/master/pkg/image/controller/imagestream_controller.go#L133 Workaround to replace these involves deleting and adding back to update based on the latest examples. # oc create -f /usr/share/ansible/openshift-ansible/roles/openshift_examples/files/examples/v3.9/image-streams/image-streams-rhel7.json -n openshift # oc delete -f /usr/share/ansible/openshift-ansible/roles/openshift_examples/files/examples/v3.9/image-streams/image-streams-rhel7.json -n openshift The automated installer only runs `oc create` so we never hit this issue unless one run `oc replace`
> Workaround to replace these involves deleting and adding back to update > based on the latest examples. > > # oc create -f > /usr/share/ansible/openshift-ansible/roles/openshift_examples/files/examples/ > v3.9/image-streams/image-streams-rhel7.json -n openshift > > # oc delete -f > /usr/share/ansible/openshift-ansible/roles/openshift_examples/files/examples/ > v3.9/image-streams/image-streams-rhel7.json -n openshift > > The automated installer only runs `oc create` so we never hit this issue > unless one run `oc replace` Exchanging the order: # oc delete -f /usr/share/ansible/openshift-ansible/roles/openshift_examples/files/examples/v3.9/image-streams/image-streams-rhel7.json -n openshift # oc create -f /usr/share/ansible/openshift-ansible/roles/openshift_examples/files/examples/v3.9/image-streams/image-streams-rhel7.json -n openshift
I've checked the `oc replace` part, and this is not causing any problems. The images before and after `oc replace` are identical, so it's definitely a problem in the controller logic, which creates empty ImageStreamImports, which are then consumed by the controller which complains. I think we can safely ignore empty ISI.
https://github.com/openshift/origin/pull/20623
Can't reproduce this bug with ocp v3.11.0-0.20.0
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:2652