Skip to content
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

[BUG][UNINSTALL] The uninstall script assumes the clustername = namespace #70

Open
e-minguez opened this issue Apr 29, 2020 · 1 comment
Assignees
Labels
bug Something isn't working deploy specific to this repository... does not imply product specific issues

Comments

@e-minguez
Copy link

e-minguez commented Apr 29, 2020

Describe the bug

The uninstall script assumes the clustername = namespace
https://github.com/open-cluster-management/deploy/blob/master/clean-clusters.sh#L41

oc delete namespace ${clusterName} --wait=false

But if it doesn't, the cluster is not deleted (the namespace is deleted)

Detaching imported clusters
 Detaching cluster kni1-virtualmasters-baremetalworkers
  Error from server (NotFound): clusters.clusterregistry.k8s.io "kni1-virtualmasters-baremetalworkers" not found
  namespace "kni1-virtualmasters-baremetalworkers" deleted
Second pass cleaning, by endpointConfig
 Detaching cluster kni1-virtualmasters-baremetalworkers
  Error from server (NotFound): clusters.clusterregistry.k8s.io "kni1-virtualmasters-baremetalworkers" not found
  namespace "kni1-virtualmasters-baremetalworkers" deleted

To Reproduce
Steps to reproduce the behavior:

  1. Attach a cluster with some name (like 'mycluster') and use a different namespace (like 'mycluster-namespace')
  2. Run the uninstall script
  3. See error

Expected behavior
The proper namespace should be deleted

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Fedora 31
  • Browser N/A
  • Snapshot N/A (fcd582d commit id)

Additional context
Add any other context about the problem here.

@e-minguez e-minguez added bug Something isn't working deploy specific to this repository... does not imply product specific issues labels Apr 29, 2020
@tpouyer
Copy link
Contributor

tpouyer commented Apr 29, 2020

Currently the automated provisioning and the import existing cluster processes will create a namespace in the HUB with the exact name you gave the managed cluster... This is done so that RBAC controls can be used to "secure" the cluster namespace in the HUB. This script does make the assumption that the cluster namespace in the hub does match exactly the cluster name of the managed cluster by design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working deploy specific to this repository... does not imply product specific issues
Projects
None yet
Development

No branches or pull requests

2 participants