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
rook-ceph-osd-prepare job pod name generation fails on kubernetes 1.22.4 #9294
Comments
I am able to repro if the 32nd character of the hostname is a
Currently Rook will shorten the job name using a hash if the total job name would be longer than 63 characters as seen here. Now it appears we need to reduce that limit to greater than 53 characters. |
Is there a workaround? Re-deploying the node is not an option. |
This issue was introduced in the job pod name generation in K8s 1.22 and is resolved with kubernetes/kubernetes#105676. I'm following up to see if this can be backported to 1.22 (currently the fix looks like only 1.23), and find a workaround in Rook in the meantime. |
We will get a fix out for this early next week with #9312. The only workaround I can think of is if you can rename the |
🎆 Now we only need a bugfix release. Thank you for the prompt response! |
v1.7.10 may not be until next week. In the meantime, could you test an interim 1.7 build and confirm that it is working for you? The image is: |
I just figured I'd look if there were any images automatically built and I found |
Hi, thanks for the fix, we tested with |
Is this a bug report or feature request?
Deviation from expected behavior:
When we try to initialise rook-ceph, osd-prepare job is failing to create pod and fails with below error
Error creating: Pod "rook-ceph-osd-prepare-ip-10-8-35-17.eu-west-2.compute.--1-f88dv" is invalid: [metadata.generateName: Invalid value: "rook-ceph-osd-prepare-ip-10-8-35-17.eu-west-2.compute.--1-": 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?)'), metadata.name: Invalid value: "rook-ceph-osd-prepare-ip-10-8-35-17.eu-west-2.compute.--1-f88dv": 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?)')]
Expected behavior:
It should create pods
How to reproduce it (minimal and precise):
on AWS, install k8s 1.22.4, install rook-ceph operator, if your nodename is in some length, it fails
here are some examples
So if you can see, it gets the job name, cuts it 54 cols, adds random dash and alphanumeric hash, after cutting the job name, if the result ends with
.
it fails RFC 1123 on k8s 1.22.4 because it's adding some random string starting with-
but it doesn't happen on 1.21.x because it's adding only alphanumeric chars (no dashes)
File(s) to submit:
cluster.yaml
, if necessaryTo get logs, use
kubectl -n <namespace> logs <pod name>
When pasting logs, always surround them with backticks or use the
insert code
button from the Github UI.Read Github documentation if you need help.
Environment:
uname -a
):rook version
inside of a Rook Pod):ceph -v
):kubectl version
):ceph health
in the Rook Ceph toolbox):The text was updated successfully, but these errors were encountered: