-
Bug
-
Resolution: Unresolved
-
Critical
-
None
-
4.17
-
Important
-
None
-
5
-
Metal Platform 260, Metal Platform 261, Metal Platform 262, Metal Platform 263, Metal Platform 264
-
5
-
Rejected
-
False
-
-
-
Bug Fix
-
In Progress
-
Description of problem:
After deleting a BaremetalHost which has a related DataImage, the DataImage is still present. I'd expect that together with the bmh deletion the dataimage gets deleted as well.
Version-Release number of selected component (if applicable):
4.17.0-rc.0
How reproducible:
100%
Steps to Reproduce:
1. Create BaremetalHost object as part of the installation process using Image Based Install operator 2. Image Based Install operator will create a dataimage as part of the install process 3. Delete the BaremetalHost object 4. Check the DataImage assigned to the BareMetalHost
Actual results:
While the BaremetalHost was deleted the DataImage is still present: oc -n kni-qe-1 get bmh No resources found in kni-qe-1 namespace. oc -n kni-qe-1 get dataimage -o yaml apiVersion: v1 items: - apiVersion: metal3.io/v1alpha1 kind: DataImage metadata: creationTimestamp: "2024-09-24T11:58:10Z" deletionGracePeriodSeconds: 0 deletionTimestamp: "2024-09-24T14:06:15Z" finalizers: - dataimage.metal3.io generation: 2 name: sno.kni-qe-1.lab.eng.rdu2.redhat.com namespace: kni-qe-1 ownerReferences: - apiVersion: metal3.io/v1alpha1 blockOwnerDeletion: true controller: true kind: BareMetalHost name: sno.kni-qe-1.lab.eng.rdu2.redhat.com uid: 0a8bb033-5483-4fe8-8e44-06bf43ae395f resourceVersion: "156761793" uid: 2358cae9-b660-40e6-9095-7daabb4d9e48 spec: url: https://image-based-install-config.multicluster-engine.svc:8000/images/kni-qe-1/ec274bfe-a295-4cd4-8847-4fe4d232b255.iso status: attachedImage: url: https://image-based-install-config.multicluster-engine.svc:8000/images/kni-qe-1/ec274bfe-a295-4cd4-8847-4fe4d232b255.iso error: count: 0 message: "" lastReconciled: "2024-09-24T12:03:28Z" kind: List metadata: resourceVersion: ""
Expected results:
The DataImage gets deleted when the BaremetalHost owner gets deleted.
Additional info:
This is impacting automated test pipelines which use ImageBasedInstall operator as the cleanup stage gets stuck waiting for the namespace deletion which still holds the DataImage. Also deleting the DataImage gets stuck and it can only be deleted by removing the finalizer. oc get namespace kni-qe-1 -o yaml apiVersion: v1 kind: Namespace metadata: annotations: openshift.io/sa.scc.mcs: s0:c33,c2 openshift.io/sa.scc.supplemental-groups: 1001060000/10000 openshift.io/sa.scc.uid-range: 1001060000/10000 creationTimestamp: "2024-09-24T11:40:03Z" deletionTimestamp: "2024-09-24T14:06:14Z" labels: app.kubernetes.io/instance: clusters cluster.open-cluster-management.io/managedCluster: kni-qe-1 kubernetes.io/metadata.name: kni-qe-1 name: kni-qe-1-namespace open-cluster-management.io/cluster-name: kni-qe-1 pod-security.kubernetes.io/audit: restricted pod-security.kubernetes.io/audit-version: v1.24 pod-security.kubernetes.io/enforce: restricted pod-security.kubernetes.io/enforce-version: v1.24 pod-security.kubernetes.io/warn: restricted pod-security.kubernetes.io/warn-version: v1.24 name: kni-qe-1 resourceVersion: "156764765" uid: ee984850-665a-4f5e-8f17-0c44b57eb925 spec: finalizers: - kubernetes status: conditions: - lastTransitionTime: "2024-09-24T14:06:23Z" message: All resources successfully discovered reason: ResourcesDiscovered status: "False" type: NamespaceDeletionDiscoveryFailure - lastTransitionTime: "2024-09-24T14:06:23Z" message: All legacy kube types successfully parsed reason: ParsedGroupVersions status: "False" type: NamespaceDeletionGroupVersionParsingFailure - lastTransitionTime: "2024-09-24T14:06:23Z" message: All content successfully deleted, may be waiting on finalization reason: ContentDeleted status: "False" type: NamespaceDeletionContentFailure - lastTransitionTime: "2024-09-24T14:06:23Z" message: 'Some resources are remaining: dataimages.metal3.io has 1 resource instances' reason: SomeResourcesRemain status: "True" type: NamespaceContentRemaining - lastTransitionTime: "2024-09-24T14:06:23Z" message: 'Some content in the namespace has finalizers remaining: dataimage.metal3.io in 1 resource instances' reason: SomeFinalizersRemain status: "True" type: NamespaceFinalizersRemaining phase: Terminating
- depends on
-
OCPBUGS-45250 DataImage owned by deleted BareMetalHost is still present after BareMetalHost deletion
- POST
- is cloned by
-
OCPBUGS-45250 DataImage owned by deleted BareMetalHost is still present after BareMetalHost deletion
- POST
- links to