Skip to content

Invalid ProviderID error is malformed #3763

@benmoss

Description

@benmoss

What steps did you take and what happened:
Have a provider write a ProviderID that doesn't match the form we describe in https://github.com/kubernetes-sigs/cluster-api/blob/master/controllers/noderefutil/providerid.go

See a confusing error in the logs:

controller.go:257] controller-runtime/controller "msg"="Reconciler error" "error"="providerID must be of the form \u003ccloudProvider\u003e://\u003coptional\u003e/\u003csegments\u003e/\u003cprovider id\u003e" "controller"="machine" "name"="bmo-md-1-6bf4fd585d-jfwbx" "namespace"="default"

What did you expect to happen:
I think we just want it to print out the error string verbatim, I don't know where the formatting strings are coming from.

Anything else you would like to add:
I remember fixing this in klog ages ago. Maybe we just need to bump that? kubernetes/klog#139

/kind bug

Metadata

Metadata

Assignees

Labels

good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.lifecycle/activeIndicates that an issue or PR is actively being worked on by a contributor.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions