cli icon indicating copy to clipboard operation
cli copied to clipboard

Uninstall should support a "force" option

Open durera opened this issue 1 month ago • 1 comments

Feature and motivation

Related to:

  • https://github.com/ibm-mas/cli/issues/1522
  • https://github.com/ibm-mas/cli/issues/1543
  • https://github.com/ibm-mas/cli/issues/198

If the MAS instance is in poor health the uninstall may fail because the uninstall tries to do a clean uninstall of the product - which will not be possible if e.g. the operator is broken.

When user specifies mas uninstall --force (or via interactive prompt) we should:

  • Still try to uninstall cleanly
  • On failure perform a force removal of the namespace/resource (ie remove finalizers from any resources and delete)
  • Allow the user to uninstall a MAS instance that doesn't appear to be installed instead of just listing the Suite instances that we can find

Uninstall should be able to run even if there isn't a MAS instance on the cluster, because there may only be MAS dependencies on the cluster

Force uninstall should present a warning that it may corrupt data/prevent a future re-install using the same database/state.

Usage example

Three main use cases:

  • A failed install should still be uninstallable
  • A broken install should be uninstallable
  • A partial/failed uninstall should be resumable by running uninstall again

durera avatar Nov 23 '25 02:11 durera

@durera @shimto-jacob-siby was working into this force option on https://github.com/ibm-mas/cli/issues/198. Can we assign this to him ?

terc1997 avatar Nov 24 '25 16:11 terc1997