Fix --link to a container which net mode is container#11369
Fix --link to a container which net mode is container#11369icecrime merged 1 commit intomoby:masterfrom
Conversation
|
Nice catch, thanks! I think this way is the proper one. |
|
ping , any suggestion for this? |
|
@coolljt0725 What if those container |
ea532d5 to
3fc9fcd
Compare
|
@LK4D4 you are right, those container also could be |
Signed-off-by: Lei Jitang <leijitang@huawei.com>
|
@LK4D4 Just in case those container could be |
|
@coolljt0725 Super cool solution. |
|
LGTM |
|
Nice and clean! LGTM |
Fix --link to a container which net mode is container
|
Excellent! Thanks @coolljt0725 LGTM |
|
@icecrime beat me to the punch!! :) |
with --link, since moby#11369 add support --net=container with --link option, there is no need to do conflict checking for --net=container with --link and actually this conflict checking never work due to the wrong if expression, it's a useless code. Signed-off-by: Lei Jitang <leijitang@huawei.com>
|
ping @icecrime @estesp @LK4D4 Seems prevent user from using |
|
I was not aware of this PR, I think it nicely fixes #9340 |
Signed-off-by: Lei Jitang leijitang@huawei.com
If
docker run --linklink to a container which net mode is container mode, it will failed withFATA[0000] Error response from daemon: Cannot start container 95c255a241c05afeb489ce2abafb650968b786adbe6ad7ef9c0571a757b96636: Child IP '' is invalidbecause if the net mode of a container is container mode, it share with net namespace with other container and the network configuration is all nil.
there are two way to fix this, one is this PR, another way is to prevent user from
linking to a container which net mode is container mode.
which way is the right way? keep me know and I will update this.
ping @LK4D4 @estesp @crosbymichael @jfrazelle