Skip to content

Previous operator version of custom resources don't get deleted #1679

Closed
@popdaniel942

Description

@popdaniel942

I was using operator version 4.1.2 and I had some CRDs and some instances of those CRDs. In the meantime I updated the operator to 4.2.0 and I also update the CRDs a little. And now if I try to remove the resources, the cleanup code is called, it is finished with a DeleteControl.defaultDelete() but then the resource does not get deleted...If I remove the finalizer manually, it gets deleted and if I recreate it with the new operator version and the updated CRDs, all is good, the deletion removes the custom resource but in the logs I always get the below error. Am I doing something wrong? Is there a problem removing custom resources that were created by a previous version of the operator or by previous versions of CRDs?

io.javaoperatorsdk.operator.processing.event.source.controller.ControllerResourceEventSource@71154f21 event handler: Should not be called with DELETED
java.lang.IllegalStateException: Should not be called with DELETED
	at io.javaoperatorsdk.operator.processing.event.source.controller.ControllerResourceEventSource.isAcceptedByFilters(ControllerResourceEventSource.java:98)
	at io.javaoperatorsdk.operator.processing.event.source.controller.ControllerResourceEventSource.eventReceived(ControllerResourceEventSource.java:75)
	at io.javaoperatorsdk.operator.processing.event.source.controller.ControllerResourceEventSource.onDelete(ControllerResourceEventSource.java:118)
	at io.javaoperatorsdk.operator.processing.event.source.controller.ControllerResourceEventSource.onDelete(ControllerResourceEventSource.java:28)
	at io.fabric8.kubernetes.client.informers.impl.cache.ProcessorListener$DeleteNotification.handle(ProcessorListener.java:122)
	at io.fabric8.kubernetes.client.informers.impl.cache.ProcessorListener.add(ProcessorListener.java:50)
	at io.fabric8.kubernetes.client.informers.impl.cache.SharedProcessor.lambda$distribute$0(SharedProcessor.java:87)
	at io.fabric8.kubernetes.client.informers.impl.cache.SharedProcessor.lambda$distribute$1(SharedProcessor.java:110)
	at io.fabric8.kubernetes.client.utils.internal.SerialExecutor.lambda$execute$0(SerialExecutor.java:58)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions