vmware / vic

vSphere Integrated Containers Engine is a container runtime for vSphere.
http://vmware.github.io/vic
Other
640 stars 173 forks source link

CI integration test failure: port mapping #2354

Closed anchal-agrawal closed 8 years ago

anchal-agrawal commented 8 years ago

A recent master build (https://ci.vmware.run/vmware/vic/4863) failed with:

Test-Cases.Group1-Docker-Commands.1-25-Docker-Port-Map :: Test 1-25 - Docke...
==============================================================================
192.168.31.13

Installing VCH to test server...
Installer completed successfully: VCH-4863-1473...
Create container with port mappings                                   | FAIL |
7 != 0

From log.html:

Running command 'curl 192.168.31.77:10000 --connect-timeout 10 2>&1'.   
12:36:24.115    INFO    ${rc} = 7

This is after a start on a container created with create -it -p 10000:80 -p 10001:80 --name webserver nginx

integration_logs_4863_dbfaf282c1ef3d0cd395bb54ddee6d4e3bb458fd_1474049824.zip

hmahmood commented 8 years ago

It looks like the 20 second wait before the curl call is still not enough; the output indicates that nginx is still not initialized.

anchal-agrawal commented 8 years ago

Also seen in https://ci.vmware.run/vmware/vic/5120.

anchal-agrawal commented 8 years ago

Definitely a timing issue. curl often times out in this case, and a retry resolves the issue.

anchal-agrawal commented 8 years ago

Seen again in https://ci.vmware.run/vmware/vic/5224 and https://ci.vmware.run/vmware/vic/5216.

anchal-agrawal commented 8 years ago

Upon further debugging with @hmahmood, we repro'd this on a local ESX running two VCHs on the default bridge network. Two containers (one of them being nginx) spun up with different VCHs ended up with the same IP and we'd get a connection refused error upon hitting the nginx endpoint even though we verified that the nginx process was running. Upon removing the second container with the same IP, we can connect to nginx just fine.

The cause for this failure is container IP conflict due to multiple VCHs sharing the same bridge network (which is unsupported). @mhagen-vmware has created #2524 to resolve this in CI.