-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release-ocm-2.11] MGMT-18370: Don't destroy cluster on detach #6556
[release-ocm-2.11] MGMT-18370: Don't destroy cluster on detach #6556
Conversation
Currently the procedure to detach a cluster that was created using hosts from a late binding pool is to first delete the `ManagedCluster` object, then add the `preserveOnDelete: true` field to the `ClusterDeployment` and then delete that `ClusterDeployment`. But the cluster deployment controller doesn't look at the `preserveOnDelete` field at all. As a result the hosts of the cluster are returned to the pool and they are provisioned again, which effectively destroys the cluster. This patch changes the deployment manager controller so that in that case it will check the `preserveOnDelete` field and if it is `true` it will delete the corresponding `Agent` objects. The result of that is that the hosts will go back to the pool, but marked the will still be marked as provisioned and they will not be provisioned again, thus avoiding the destruction of the cluster. Note that the `BareMetalHosts` will not be removed, but they will stay detached. Related: https://issues.redhat.com/browse/MGMT-17893 Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
@openshift-cherrypick-robot: Ignoring requests to cherry-pick non-bug issues: MGMT-17893 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
/retitle [release-ocm-2.11] MGMT-18370: Don't destroy cluster on detach |
@openshift-cherrypick-robot: This pull request references MGMT-18370 which is a valid jira issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release-ocm-2.11 #6556 +/- ##
=================================================
Coverage 68.45% 68.46%
=================================================
Files 247 247
Lines 36252 36261 +9
=================================================
+ Hits 24818 24827 +9
Misses 9235 9235
Partials 2199 2199
|
/retest-required |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gamli75, openshift-cherrypick-robot The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
1 similar comment
/retest |
@openshift-cherrypick-robot: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
7aca935
into
openshift:release-ocm-2.11
This is an automated cherry-pick of #6532
/assign jhernand