kubernetes-sigs / cluster-api

Home for Cluster API, a subproject of sig-cluster-lifecycle
https://cluster-api.sigs.k8s.io
Apache License 2.0
3.58k stars 1.32k forks source link

clusterctl does not delete successfully #1469

Closed wfernandes closed 5 years ago

wfernandes commented 5 years ago

What steps did you take and what happened:

  1. Use this version bf790fc2 of cluster-api to build clusterctl.
  2. Use this version 0dd895830 of cluster-api-provider-aws to generate the example manifests
  3. Update examples/_out/controlplane.yaml to have only a single control plane machine.
  4. Run the following to create target cluster $ clusterctl create cluster -v 4 --bootstrap-type kind -c examples/_out/cluster.yaml -m examples/_out/controlplane.yaml -p examples/_out/provider-components.yaml -a examples/addons.yaml --bootstrap-flags "name=wff-sept30"
  5. Verify that the target cluster has been created
  6. Run the following to delete cluster $ clusterctl delete cluster --kubeconfig ../playground/kubeconfig --provider-components examples/_out/provider-components.yaml --bootstrap-type kind

What did you expect to happen: Expected to see all resources in AWS successfully deleted.

Anything else you would like to add: These are the logs from the delete command:

NOTICE: clusterctl has been deprecated in v1alpha2 and will be removed in a future version. I0930 15:22:57.751313 76551 clusterdeployer.go:174] Creating bootstrap cluster I0930 15:22:57.751434 76551 createbootstrapcluster.go:27] Preparing bootstrap cluster I0930 15:23:22.139055 76551 clusterdeployer.go:182] Pivoting Cluster API stack to bootstrap cluster I0930 15:23:22.139085 76551 pivot.go:76] Applying Cluster API Provider Components to Target Cluster I0930 15:23:23.195064 76551 pivot.go:81] Pivoting Cluster API objects from bootstrap to target cluster. I0930 15:24:06.884359 76551 clusterdeployer.go:192] Deleting objects from bootstrap cluster I0930 15:24:06.884380 76551 clusterdeployer.go:220] Deleting MachineDeployments in all namespaces I0930 15:24:06.886420 76551 clusterdeployer.go:225] Deleting MachineSets in all namespaces I0930 15:24:06.888256 76551 clusterdeployer.go:230] Deleting Machines in all namespaces I0930 15:24:06.889845 76551 clusterdeployer.go:235] Deleting Clusters in all namespaces I0930 15:24:06.891537 76551 createbootstrapcluster.go:36] Cleaning up bootstrap cluster. F0930 15:24:08.384767 76551 delete_cluster.go:56] unable to finish deleting objects in bootstrap cluster, resources may have been leaked: error(s) encountered deleting objects from bootstrap cluster: [error deleting MachineDeployments: error deleting Clusters in namespace "": the server could not find the requested resource (delete machinedeployments.cluster.x-k8s.io), error deleting MachineSets: error deleting Clusters in namespace "": the server could not find the requested resource (delete machinesets.cluster.x-k8s.io), error deleting Machines: error deleting Clusters in namespace "": the server could not find the requested resource (delete machines.cluster.x-k8s.io), error deleting Clusters: error deleting Clusters in namespace "": the server could not find the requested resource (delete clusters.cluster.x-k8s.io)]

Environment:

/kind bug

vincepri commented 5 years ago

/help /priority important-soon /milestone v0.2.x

k8s-ci-robot commented 5 years ago

@vincepri: This request has been marked as needing help from a contributor.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-help command.

In response to [this](https://github.com/kubernetes-sigs/cluster-api/issues/1469): >/help >/priority important-soon >/milestone v0.2.x Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
wfernandes commented 5 years ago

I can take a look at this issue unless anyone has any objections.

/assign

wfernandes commented 5 years ago

/lifecycle active