You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 5, 2022. It is now read-only.
Currently, the barrel will return a bad gateway error to the client when failed. For example, when it failed to allocate a new address when creating a container with a fixed-ip label, it will show a bad gateway error.
Aug 25 19:02:51 bash[23490]: time="2021-08-25 19:02:51" level=info msg="Ran out of existing affine blocks for host"
Aug 25 19:02:51 bash[23490]: time="2021-08-25 19:02:51" level=info msg="Auto-assigned 0 out of 1 IPv4s: []"
Aug 25 19:02:51 bash[23490]: time="2021-08-25 19:02:51" level=error msg="[containerCreateHandler::Handle] check and request fixed-ip failed Unexpected number of assigned IP addresses. A single address should be assigned. Got []"
But the error message is not explicit to read on the client-side:
Error response from daemon: check and request fixed-ip error
Improvement
The Barrel should be compatible with the docker client and act like a normal dockerd.
Extra
Actually, it's not my first time helping others (like QA colleagues) and I have already found it's difficult to identify the root cause. I am recalling my memory of it, if I made it, I will update it here.
Update:
I have recalled it. On day QA came to ask me why he kept getting an error The requested subnet must match the CIDR of a configured Calico IP Pool when creating new containers using the calico network in his own test cluster.
It looked like the subnet was not right in the configuration. But after confirming this and others, it wasn't the cause. And I created a new one with calico, it worked normally. That really confused me. After spending time to reading code and logs, I found the problem finally. The related code was:
Though I didn't know how it happened, the network.ID didn't match that in the configuration of docker. So the error message was totally misleading. I suggest we output appropriate and explicit logs at least or good to have a more explicit error message.
The text was updated successfully, but these errors were encountered:
understand, 502 was designed to distinguish errors of proxy from errors of dockerd, it is ok for a http request but will cause error for docker client, i'll make it compatible with docker client.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Background
Currently, the barrel will return a bad gateway error to the client when failed. For example, when it failed to allocate a new address when creating a container with a
fixed-ip
label, it will show a bad gateway error.Related code:
Logging:
But the error message is not explicit to read on the client-side:
Improvement
The Barrel should be compatible with the docker client and act like a normal dockerd.
Extra
Actually, it's not my first time helping others (like QA colleagues) and I have already found it's difficult to identify the root cause. I am recalling my memory of it, if I made it, I will update it here.
Update:
I have recalled it. On day QA came to ask me why he kept getting an error
The requested subnet must match the CIDR of a configured Calico IP Pool
when creating new containers using the calico network in his own test cluster.It looked like the subnet was not right in the configuration. But after confirming this and others, it wasn't the cause. And I created a new one with calico, it worked normally. That really confused me. After spending time to reading code and logs, I found the problem finally. The related code was:
Though I didn't know how it happened, the
network.ID
didn't match that in the configuration of docker. So the error message was totally misleading. I suggest we output appropriate and explicit logs at least or good to have a more explicit error message.The text was updated successfully, but these errors were encountered: