strimzi-kafka-operator
strimzi-kafka-operator copied to clipboard
When using KafkaConnectBuild with ImageStreams on OCP, we should validate it exists
When using Kafka Connect Build on OCP with output configured with type: imagestream, the user is responsible for creating the ImageStream object first. This is correct behaviour and there does not seem to be any need to change it. However, we do not validate that the ImageStream exists. So when it doesn't, the OpenShift Build never starts and the reconciliation fails after the timeout with following error:
2022-07-13 20:19:48 ERROR AbstractOperator:247 - Reconciliation #89(watch) KafkaConnect(myproject/my-connect): createOrUpdate failed
io.strimzi.operator.common.operator.resource.TimeoutException: Exceeded timeout of 300000ms while waiting for Build resource my-connect-connect-build-4 in namespace myproject to be complete
at io.strimzi.operator.common.Util$1.lambda$handle$1(Util.java:154) ~[io.strimzi.operator-common-0.30.0.jar:0.30.0]
at io.vertx.core.impl.future.FutureImpl$3.onFailure(FutureImpl.java:153) ~[io.vertx.vertx-core-4.2.4.jar:4.2.4]
at io.vertx.core.impl.future.FutureBase.lambda$emitFailure$1(FutureBase.java:69) ~[io.vertx.vertx-core-4.2.4.jar:4.2.4]
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[io.netty.netty-common-4.1.77.Final.jar:4.1.77.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[io.netty.netty-common-4.1.77.Final.jar:4.1.77.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[io.netty.netty-common-4.1.77.Final.jar:4.1.77.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:503) ~[io.netty.netty-transport-4.1.77.Final.jar:4.1.77.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995) ~[io.netty.netty-common-4.1.77.Final.jar:4.1.77.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[io.netty.netty-common-4.1.77.Final.jar:4.1.77.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[io.netty.netty-common-4.1.77.Final.jar:4.1.77.Final]
at java.lang.Thread.run(Thread.java:829) ~[?:?]
This is not really clear and the user might not understand from it what the issue is here. We should validate if the ImageStream exists or not and it if doesn't, throw some appropriatte exception from which users will understand what needs to be done.
No, this might sound trivial, but this will include creating and adding the ImageStreamOperator to the operator-common module and to the ResourceOperatorSupplier etc., so I do not think it is a good start issue.
Triaged on 25.8.2022: Not super important, but could be useful. We should keep it nd get to it over time.