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

Error message is hard to decipher #2055

Closed
wfernandes opened this issue Jan 13, 2020 · 4 comments
Closed

Error message is hard to decipher #2055

wfernandes opened this issue Jan 13, 2020 · 4 comments
Labels
area/clusterctl Issues or PRs related to clusterctl kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@wfernandes
Copy link
Contributor

What steps did you take and what happened:

  1. kind create cluster
  2. make release-manifests
  3. clusterctl init -b out/bootstrap-components.yaml --core out/core-components.yaml --infrastructure=aws

Got the following error:

performing init...
Error: invalid name value: a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is 'a-z0-9?')

It is very hard to decipher which name field is breaking this rule. The user has to go through all the yaml and probably even look up aws release manifest.

What did you expect to happen:
For such an error, it would be nice to display the name of the field/component that the error is occurring on.

Environment:

  • Cluster-api version: 7b2ad21
  • Minikube/KIND version: kind v0.6.1 go1.13.4 darwin/amd64
  • Kubernetes version: (use kubectl version):
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.3", GitCommit:"b3cbbae08ec52a7fc73d334838e18d17e8512749", GitTreeState:"clean", BuildDate:"2019-12-04T07:23:47Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}
  • OS (e.g. from /etc/os-release):

/kind bug
/area clusterctl

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. area/clusterctl Issues or PRs related to clusterctl labels Jan 13, 2020
@fabriziopandini
Copy link
Member

@wfernandes I agree there is room for improvement there.

In the meantime let me point out to #1994 where I'm starting to document how the new clusterctl works. IT is explained e.g. which provider you can use (you are not allowed to pass YAML anymore)

Also, #2027 introduced a hack to make it possible to test the new clusterctl even if there are not yet v1 alpha3 releases of the providers

@fabriziopandini
Copy link
Member

@wfernandes #2048 is going to fix the error message

@ncdc ncdc added this to the v0.3.0 milestone Jan 15, 2020
@wfernandes
Copy link
Contributor Author

/close
Closing this since it has been resolved by #2048

if err := validateDNS1123Label(name); err != nil {
return "", "", errors.Wrapf(err, "invalid provider name %q. Provider name should be in the form name[:version] and the name should be valid", provider)
}

@k8s-ci-robot
Copy link
Contributor

@wfernandes: Closing this issue.

In response to this:

/close
Closing this since it has been resolved by #2048

if err := validateDNS1123Label(name); err != nil {
return "", "", errors.Wrapf(err, "invalid provider name %q. Provider name should be in the form name[:version] and the name should be valid", provider)
}

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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

Successfully merging a pull request may close this issue.

4 participants