drogue-iot / drogue-cloud

Cloud Native IoT
https://drogue.io
Apache License 2.0
113 stars 30 forks source link

Applications deleted just instant after their creations get a stuck finalizer #326

Closed jbtrystram closed 1 year ago

jbtrystram commented 1 year ago

in drg CI I have apps that are stuck with a finalizer that does not get resolved. I think this is maybe due to trying to delete them too soon after they get created ?

{
  "metadata": {
    "name": "1043c257-e973-4731-9d93-589aee17ce74",
    "uid": "166c6a2b-36e4-4285-8670-e7027373f070",
    "creationTimestamp": "2022-07-13T10:19:13.433179Z",
    "generation": 0,
    "resourceVersion": "42eeccef-9112-475d-a8f2-f5a753d2e85a",
    "deletionTimestamp": "2022-07-13T10:19:14.869914Z",
    "finalizers": [
      "kafka-topic"
    ]
  },
  "status": {
    "kafka": {
      "conditions": [
        {
          "type": "HasFinalizer",
          "status": "False",
          "lastTransitionTime": "2022-07-13T10:19:14.452239118Z"
        },
        {
          "type": "CreateTopics",
          "status": "Unknown",
          "lastTransitionTime": "2022-07-13T10:19:14.452240601Z"
        },
        {
          "type": "Reconciled",
          "reason": "Failed",
          "status": "False",
          "message": "Failed to delete topic: Admin operation error: UnknownTopicOrPartition (Broker: Unknown topic or partition)",
          "lastTransitionTime": "2022-07-13T10:19:14.452243506Z"
        }
      ],
      "observedGeneration": 0
    },
    "conditions": [
      {
        "type": "Ready",
        "reason": "NonReadyConditions",
        "status": "False",
        "lastTransitionTime": "2022-07-13T10:19:14.452274985Z"
      },
      {
        "type": "KafkaReady",
        "reason": "WaitingForReady",
        "status": "False",
        "message": "Waiting to become ready: HasFinalizer",
        "lastTransitionTime": "2022-07-13T10:19:14.452260698Z"
      }
    ]
  }
}
ctron commented 1 year ago

Yea, that looks like a bug. I guess when deleting, and getting an error of "not found" then this should be considered as "success".