Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1666556

Summary: Machine Deployment should support cascade deletion
Product: OpenShift Container Platform Reporter: Yadan Pei <yapei>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED DUPLICATE QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.1.0CC: aos-bugs, jhadvig, jokerman, mmccomas, spadgett, yapei
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-17 20:30:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yadan Pei 2019-01-16 02:54:47 UTC
Description of problem:
Delete Machine Deployment from console doesn't remove machines created by it

Version-Release number of selected component (if applicable):
$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE     STATUS
version   4.0.0-0.nightly-2019-01-15-010905   True        False         11m       Cluster version is 4.0.0-0.nightly-2019-01-15-010905
$ sudo podman inspect <console_image_id>
            "version": "v4.0.0"
            "release": "0.139.0.0",
            "io.openshift.source-repo-commit": "a62eaa43f2aab9a817a3fb66e1c8b88d5ef100da",

How reproducible:
Always

Steps to Reproduce:
1. Cluster-admin goes to Administration -> Machine Deployment page
2. Create a Machine Deployment from default YAML, some machines will be created
3. Actions -> Delete Machine Deployment
4. check if machines are removed or not
$ oc get machines --selector=foo=bar --all-namespaces
openshift-cluster-api   example-cbdc48fcd-qbcjm                                                      8s
openshift-cluster-api   example-cbdc48fcd-w4kmm                                                      8s
openshift-cluster-api   example-cbdc48fcd-ws5gn                                                      8s


Actual results:
4. Machines created via Machine Deployment is not deleted

Expected results:
4. We should support cascade deletion for Machine Deployment

Additional info:

Comment 1 Yadan Pei 2019-01-16 03:18:07 UTC
I think the root cause is https://bugzilla.redhat.com/show_bug.cgi?id=1666558

@sam can you double confirm? If yes, it can be closed

Comment 2 Jakub Hadvig 2019-01-17 14:00:57 UTC
I could reproduce the described issue also through the CLI,
meaning that after deleting the Machine Deployment,
it's Machines haven't been removed.

I see that the Machines have blockOwnerDeletion set to true,
so the cascade deletion was propagated, but for some reason the
the controller has not delete the created Machines.
For that reason I dont think it's Console related issue.

Comment 3 Samuel Padgett 2019-01-17 20:29:28 UTC
Yes, it looks like a duplicate of bug 1666556. The machine is getting a deletion timestamp set, but it's not been deleting (presumably because the providerSpec is not correct).

Comment 4 Samuel Padgett 2019-01-17 20:30:06 UTC

*** This bug has been marked as a duplicate of bug 1666558 ***