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

OpenStack instance creation errors aren't logged #888

Closed
macaptain opened this issue Jun 1, 2021 · 1 comment · Fixed by #891
Closed

OpenStack instance creation errors aren't logged #888

macaptain opened this issue Jun 1, 2021 · 1 comment · Fixed by #891
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@macaptain
Copy link
Contributor

/kind bug

What steps did you take and what happened:

If OpenStack instance creation fails, the error is logged as: error creating Openstack instance: <nil>

E0601 10:13:01.337910       8 openstackmachine_controller.go:389] controller-runtime/manager/controller/openstackmachine "msg"="OpenStack instance cannot be created: error creating Openstack instance: error creating Openstack instance: <nil>" "error"="UpdateError" "cluster"="basic-1" "machine"="basic-1-control-plane-v844x" "name"="basic-1-control-plane-bv6dz" "namespace"="default" "openStackCluster"="basic-1" "openStackMachine"="basic-1-control-plane-bv6dz" "reconciler group"="infrastructure.cluster.x-k8s.io" "reconciler kind"="OpenStackMachine" 

This is because the error from server creation is reassigned to be the error from ports deletion before the error is logged:

if mc.ObserveRequest(err) != nil {
if err = s.deletePorts(eventObject, portList); err != nil {
return nil, err
}
return nil, fmt.Errorf("error creating Openstack instance: %v", err)
}

What did you expect to happen:
I expect to see the error from the OpenStack response included in the controller logs.

Environment:

  • Cluster API Provider OpenStack version (Or git rev-parse HEAD if manually built):
  • Cluster-API version:
  • OpenStack 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 Jun 1, 2021
@jichenjc
Copy link
Contributor

jichenjc commented Jun 1, 2021

good catch

do you mind create a PR to fix ? should be relatively not that hard...

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