-
Notifications
You must be signed in to change notification settings - Fork 94
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
[BUG] The program crashes if the image name does not contain colon #918
Comments
hoyhbx
changed the title
The program crashes if the image name does not contain colon
[BUG] The program crashes if the image name does not contain colon
Jun 19, 2022
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of operator are you using?
commit 561cf47 (HEAD -> master)
What operating system and processor architecture are you using (
kubectl version
)?Ubuntu. 20.04
kubectl version
OutputWhat did you do?
We found that crdb-operator will crash if we do not supply version for cockroachdb image. We supplied
cockroachdb/cockroach
for thespec.image
field, and the operator crashes at this lineReproduce
We first applied the operator yaml file and crd yaml file to deploy the operator.
Then we applied the following cr.yaml file to deploy the cockroachdb cluster:
by using
kubectl apply -f cr.yaml -n cockroach-operator-system
cr.yaml:
What did you see?
The operator crashes.
Possible root cause
It seems that the cockroach operator has assumed that there will always be a colon in the image name, as this line suggests. There is no code preventing the program from crashing if an image name without a colon is provided. And if the image name does not have a colon, there will be an "index going out of range" error.
This is a bug, since crashing behavior is considered as bad behavior. There should be a sanity check to examine the validation of the image name, at least not let the program crash.
The text was updated successfully, but these errors were encountered: