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

check nil cluster is provided #317

Closed
jichenjc opened this issue Apr 22, 2019 · 3 comments · Fixed by #339
Closed

check nil cluster is provided #317

jichenjc opened this issue Apr 22, 2019 · 3 comments · Fixed by #339
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@jichenjc
Copy link
Contributor

/kind bug

What steps did you take and what happened:
[A clear and concise description of what the bug is.]
At the moment, cluster-api-provider-openstack panics with a nil pointer if there is no cluster
We might want to make sure to return an error if a nil cluster is provided.

What did you expect to happen:

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

Environment:

  • Cluster-api version:
  • Minikube/KIND version:
  • Kubernetes version: (use kubectl version):
  • OS (e.g. from /etc/os-release):
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 22, 2019
@jichenjc
Copy link
Contributor Author

/assign

@jichenjc
Copy link
Contributor Author

@chrigl can you take a look whether I am finding the right place? I think during review on update cluster-api version PR,
this is the place you talked about ? if cluster is nil, then we will panice
https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/master/pkg/cloud/openstack/cluster/actuator.go#L31
seems aws has same issue?
https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/master/pkg/cloud/aws/actuators/cluster/actuator.go#L61

or I am in wrong place ?

@chrigl
Copy link

chrigl commented Apr 26, 2019

@jichenjc Yes this is one place. Other places are in machine/actuator.go

Maybe just doing a check at the top of all of the machine.Actuator functions, to prevent further accident panics.

And also yes. The aws code also looks like to have this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants