Comment 3 for bug 1768845

Revision history for this message
Christopher Lee (veebers) wrote :

The "add-k8s" command stores data on the active controller as well as local config.
"remove-cloud" needs to check the controller, if the cloud is in use refuse to remove and if not in use remove the details from the controller db. It then (potentially, see below) will remove the details from the local config.

Query:
What if someone has "add-k8s blah" on multi controllers? Thus having the details on many controllers, should the remove-cloud command:
  - attempt to contact all known controllers and attempt removal from them
  - Only remove from the active controller, and from the local config?

Should (and I know splitting commands is frowned upon) this be split, to:
  - remove-k8s -> remove details from controller (if not in use) leaving local config alone.
  - remove-cloud -> Only attempts to remove from local config
    - This might mean that "add-k8s" will fail if trying to re-run on a controller that hasn't had 'remove-k8s' on it
    - Perhaps need to add --overwrite or --replace to "add-k8s" that will re-populate the details on the controller side.