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

Default LeaderElectionID is invalid #1640

Closed
goyalankit opened this issue Jul 28, 2022 · 0 comments · Fixed by #1639
Closed

Default LeaderElectionID is invalid #1640

goyalankit opened this issue Jul 28, 2022 · 0 comments · Fixed by #1639

Comments

@goyalankit
Copy link
Contributor

goyalankit commented Jul 28, 2022

The default leader election ID has an invalid format. If one enables leader election through leader-elect=true, the operator fails to start with the following error:

Example:

> go run ./cmd/training-operator.v1/main.go -leader-elect=true --namespace kubeflow
1.6589798403535447e+09  INFO    controller-runtime.metrics      Metrics server is starting to listen    {"addr": ":8080"}
1.6589798403555276e+09  INFO    setup   starting manager
1.6589798403558226e+09  INFO    Starting server {"path": "/metrics", "kind": "metrics", "addr": "[::]:8080"}
1.6589798403558557e+09  INFO    Starting server {"kind": "health probe", "addr": "[::]:8081"}
I0727 20:44:00.356108 1889297 leaderelection.go:248] attempting to acquire leader lease kubeflow/1ca428e5....
E0727 20:44:00.360526 1889297 leaderelection.go:334] error initially creating leader election record: Lease.coordination.k8s.io "1ca428e5." is invalid: metadata.name: Invalid value: "1ca428e5.": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
E0727 20:44:04.107669 1889297 leaderelection.go:334] error initially creating leader election record: Lease.coordination.k8s.io "1ca428e5." is invalid: metadata.name: Invalid value: "1ca428e5.": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')

Fails to acquire lease:

E0727 20:44:04.107669 1889297 leaderelection.go:334] error initially creating leader election record: Lease.coordination.k8s.io "1ca428e5." is invalid: metadata.name: Invalid value: "1ca428e5.": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant