Skip to content

[minor] Introduce safe CP4D uninstall role#2093

Open
harsh-patel14 wants to merge 15 commits into
masterfrom
mascore-3742
Open

[minor] Introduce safe CP4D uninstall role#2093
harsh-patel14 wants to merge 15 commits into
masterfrom
mascore-3742

Conversation

@harsh-patel14
Copy link
Copy Markdown
Contributor

@harsh-patel14 harsh-patel14 commented Jan 29, 2026

Description:

This PR introduces a robust and safe uninstall workflow for Cloud Pak for Data (CP4D).

The changes focus on:

  • Making CP4D uninstall safe by default with explicit user confirmation.
  • Handling partially uninstalled and broken states commonly seen in real clusters.
  • Removing operator- and service-level finalizers that block namespace deletion.

Test Results:

Validated against a OpenShift cluster with:

  • CP4D 5.2.
  • WML, WSL, CA, and SPARK services installed.

Tested scenarios:

  • Full CP4D uninstall.
  • Namespaces stuck in Terminating state.
  • Remaining service CRs with finalizers after operator removal.

Verified outcomes:

  • CP4D presence is detected before any uninstall actions.
  • Uninstall safely exits when not approved.
  • Finalizers are removed only for CP4D-related resources.
  • Namespaces are successfully deleted once blocking resources are cleaned.

Other notes:

  • Internal Jira: mascore-3742.
  • I have attached log file of uninstall process for your varification purpose.
  • I would be like to have more suggestions to enhnace or rectify anything this role includes.

Comment thread ibm/mas_devops/roles/cp4d_uninstall/meta/main.yml Outdated
Comment thread ibm/mas_devops/roles/cp4d_uninstall/handlers/main.yml Outdated
Comment thread ibm/mas_devops/roles/cp4d_uninstall/tasks/check_cp4d_present.yml Outdated
Comment thread ibm/mas_devops/roles/cp4d_uninstall/tasks/main.yml
Comment thread ibm/mas_devops/roles/cp4d_uninstall/vars/main.yml Outdated
Comment thread ibm/mas_devops/roles/cp4d_uninstall/README.md Outdated
@durera durera changed the title Introduce safe CP4D uninstall role [minor] Introduce safe CP4D uninstall role Jan 30, 2026
@harsh-patel14
Copy link
Copy Markdown
Contributor Author

Screenshot 2026-02-24 at 12 08 48 PM Screenshot 2026-02-24 at 12 09 08 PM Screenshot 2026-02-24 at 12 09 20 PM Screenshot 2026-02-24 at 12 09 29 PM Screenshot 2026-02-24 at 12 09 36 PM Screenshot 2026-02-24 at 12 09 42 PM Screenshot 2026-02-24 at 12 09 49 PM Screenshot 2026-02-24 at 12 09 56 PM Screenshot 2026-02-24 at 12 10 04 PM

@terc1997 terc1997 requested a review from durera March 3, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants