service-binding-operator icon indicating copy to clipboard operation
service-binding-operator copied to clipboard

Status change 'True' when deleteing processingError

Open 2smin opened this issue 2 years ago • 3 comments

What is the environment (Minikube, Openshift)?

Kubernetes 1.22

What is the SBO version used?

1.1.1

What are the steps to reproduce this issue?

  1. apply servicebinding with typo (with application or backing service which is not exist)
  2. delete servicebinding

What is the expected behaviour?

delete servicebinding immediately

What is the actual behaviour?

at first, servicebinding ready condition changes to true (ApplicationBound - true), and is not deleted immediately and then after seconds, finally it deleted

Service Binding Operator Logs

{"level":"info","ts":1662349375.74745,"logger":"controllers.ServiceBinding","msg":"Deleted, unbind the application","serviceBinding":"smlee/kafka-tomcat-binding3"} {"level":"error","ts":1662349376.156951,"logger":"controller.servicebinding","msg":"Reconciler error","reconciler group":"binding.operators.coreos.com","reconciler kind":"ServiceBinding","name":"kafka-tomcat-binding3","namespace":"smlee","error":"Operation cannot be fulfilled on servicebindings.binding.operators.coreos.com "kafka-tomcat-binding3": the object has been modified; please apply your changes to the latest version and try again","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:227"}

{"level":"info","ts":1662349405.0006185,"logger":"controllers.ServiceBinding","msg":"Deleted, unbind the application","serviceBinding":"smlee/kafka-tomcat-binding3"} {"level":"info","ts":1662349405.0432987,"logger":"controllers.ServiceBinding","msg":"Done","serviceBinding":"smlee/kafka-tomcat-binding3","retry":false,"error":null} {"level":"info","ts":1662349405.0434263,"logger":"controllers.ServiceBinding","msg":"ServiceBinding resource not found. Ignoring since object must be deleted","serviceBinding":"smlee/kafka-tomcat-binding3","name":{"namespace":"smlee","name":"kafka-tomcat-binding3"},"err":"ServiceBinding.binding.operators.coreos.com "kafka-tomcat-binding3" not found"}

Additional Information (Screenshots, etc)

at first, it shows like this after applying servicebinding with typo 캡처

with describe command, image

and then when I delete this servicebinding resource, it changes like this image

with describe command, image

why these happens? I thought it would removed directly after use delete command but it takes time with error log, with applicationBound - true status.

2smin avatar Sep 05 '22 05:09 2smin

Hello @2smin, Thanks for the report. We'll be looking into this.

sadlerap avatar Sep 06 '22 21:09 sadlerap

I've been able to reproduce this issue by applying the following:

apiVersion: servicebinding.io/v1beta1
kind: ServiceBinding
metadata:
  name: test-binding
spec:
  service:
    apiVersion: v1
    kind: Secret
    name: test-secret
  workload:
    name: test
    apiVersion: apps/v1
    kind: Deployment

So long as you don't make the corresponding secret, this demonstrates the behavior you were seeing.

sadlerap avatar Sep 08 '22 12:09 sadlerap

Thanks for your feedback. My servicebinding apiVersion is binding.operators.coreos.com and not only secret, any resources that is not exist makes this situation

i'm using service-binding-operator image [quay.io/redhat-developer/servicebinding-operator:9230857d], and below is my servicebinding.yaml (I applied new yaml differ with my above comment)

================================= apiVersion: binding.operators.coreos.com/v1alpha1 kind: ServiceBinding metadata: name: test-binding spec: bindAsFiles: true namingStrategy: '{{ .name | upper }}' detectBindingResources: true services:

  • version: v1 group: apps kind: ReplicaSet name: kubia namespace: smlee application: group: apps version : v1 kind: StatefulSet name: tomcat-sts

2smin avatar Sep 13 '22 04:09 2smin