Hi all,
I just got a problem where the kubedb operator prevented a namespace from being deleted where only one mongodb database was in state "Creating"
NAME VERSION STATUS AGE
mongodb.kubedb.com/nav-19-navigation-mongodb 4.1.7-v1 Creating 5m
I deleted the namespace (nav-19) in that moment, before the StatefulSet was created (or, exactly when it was being created). Apparently the k8s API server rejected creation, and the operatur was stuck.
Excerpt from the log of the kubedb operator:
I0718 12:49:37.606522 1 appbinding.go:60] Patching AppBinding nav-19/nav-19-navigation-mongodb with {"metadata":{"labels":{"app":null}}}.
I0718 13:05:05.186568 1 unstructured.go:84] Patching /v1, Resource=secrets nav-19/nav-19-navigation-mongodb-keyfile with {"metadata":{"ownerReferences":[{"apiVersion":"kubedb.com/v1alpha1","blockOwnerDeletion":false,"kind":"MongoDB","name":"nav-19-navigation-mongodb","uid":"acf22154-a955-11e9-9f20-42010a8401e9"}]}}.
I0718 13:05:05.195965 1 unstructured.go:84] Patching /v1, Resource=persistentvolumeclaims nav-19/datadir-nav-19-navigation-mongodb-0 with {"metadata":{"ownerReferences":[{"apiVersion":"kubedb.com/v1alpha1","blockOwnerDeletion":false,"kind":"MongoDB","name":"nav-19-navigation-mongodb","uid":"acf22154-a955-11e9-9f20-42010a8401e9"}]}}.
I0718 13:05:05.208198 1 unstructured.go:84] Patching /v1, Resource=persistentvolumeclaims nav-19/datadir-nav-19-navigation-mongodb-1 with {"metadata":{"ownerReferences":[{"apiVersion":"kubedb.com/v1alpha1","blockOwnerDeletion":false,"kind":"MongoDB","name":"nav-19-navigation-mongodb","uid":"acf22154-a955-11e9-9f20-42010a8401e9"}]}}.
I0718 13:05:05.216904 1 unstructured.go:84] Patching /v1, Resource=persistentvolumeclaims nav-19/datadir-nav-19-navigation-mongodb-2 with {"metadata":{"ownerReferences":[{"apiVersion":"kubedb.com/v1alpha1","blockOwnerDeletion":false,"kind":"MongoDB","name":"nav-19-navigation-mongodb","uid":"acf22154-a955-11e9-9f20-42010a8401e9"}]}}.
I0718 13:05:05.222695 1 mongodb.go:58] Patching MongoDB nav-19/nav-19-navigation-mongodb with {"metadata":{"finalizers":null}}.
I0718 13:06:05.867455 1 mongodb.go:58] Patching MongoDB nav-19/nav-19-navigation-mongodb with {"metadata":{"finalizers":["kubedb.com"]}}.
I0718 13:06:06.124151 1 service.go:19] Creating Service nav-19/nav-19-navigation-mongodb-gvr.
I0718 13:06:06.154056 1 serviceaccount.go:19] Creating ServiceAccount nav-19/nav-19-navigation-mongodb.
I0718 13:06:06.218999 1 role.go:19] Creating Role nav-19/nav-19-navigation-mongodb.
I0718 13:06:06.275208 1 rolebinding.go:19] Creating RoleBinding nav-19/nav-19-navigation-mongodb.
I0718 13:06:06.316422 1 serviceaccount.go:19] Creating ServiceAccount nav-19/nav-19-navigation-mongodb-snapshot.
I0718 13:06:06.332572 1 role.go:19] Creating Role nav-19/nav-19-navigation-mongodb-snapshot.
I0718 13:06:06.358197 1 rolebinding.go:19] Creating RoleBinding nav-19/nav-19-navigation-mongodb-snapshot.
I0718 13:06:06.415299 1 service.go:19] Creating Service nav-19/nav-19-navigation-mongodb.
I0718 13:06:06.456272 1 mongodb.go:58] Patching MongoDB nav-19/nav-19-navigation-mongodb with {"spec":{"certificateSecret":{"secretName":"nav-19-navigation-mongodb-keyfile"}}}.
I0718 13:06:06.501321 1 statefulset.go:22] Creating StatefulSet nav-19/nav-19-navigation-mongodb.
Restarting the operator pod solved the issue, and the namespace was then deleted. However, I'd expect that these cases do not happen :).
Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.96. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
Most helpful comment
Issue-Label Bot is automatically applying the label
bugto this issue, with a confidence of 0.96. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!Links: app homepage, dashboard and code for this bot.