docker-archive / classicswarm

Swarm Classic: a container clustering system. Not to be confused with Docker Swarm which is at https://github.com/docker/swarmkit
Apache License 2.0
5.76k stars 1.08k forks source link

Could not run integration tests #682

Closed chanwit closed 9 years ago

chanwit commented 9 years ago

I think there's something prevents us to run integration tests recently. I cannot complete any test. Probably it's because the dind image is changed to dockerswarm/docker?

Most of time I suspect each script is hanging around docker_swarm info but not really sure.

/cc @aluzzardi

abronan commented 9 years ago

@chanwit Tests are hanging on the last test of each file. Doing Ctrl-C shows the test succeeding. It seems to be related to bats somehow sstephenson/bats#80

cc/ @aluzzardi @vieux

aluzzardi commented 9 years ago

Tests hanging means we forgot to do a cleanup

chanwit commented 9 years ago

Yes, that is what I am aware of. But something's strange when upgrading to Docker 1.6.0 as I cannot do regression on existing integration tests any more.

I have no idea what's going on here on my machine.

abronan commented 9 years ago

@chanwit Can you pull the latest changes (merged with #685) and try again to see if that fixes the issue?

snrism commented 9 years ago

@abronan @aluzzardi after pulling the latest code, I am still facing some issues running the integration tests. The tests fail when swarm manage is called and it backtraces to this https://github.com/docker/swarm/blob/master/test/integration/helpers.bash#L28 call. I rebuilt the binary and ran bats test/integration/<filename> .

aluzzardi commented 9 years ago

Could you provide the complete output?

snrism commented 9 years ago

Here is the output when I run port-filter.bats

✗ docker should filter port in host mode correctly (from function build_swarm' in file test/integration/helpers.bash, line 28, from functionswarm_manage' in file test/integration/helpers.bash, line 52, in test file test/integration/port-filter.bats, line 12) `swarm_manage' failed Containers: 0 Images: 0 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 0 Dirperm1 Supported: false Execution Driver: native-0.2 Kernel Version: 3.13.0-39-generic Operating System: Ubuntu 14.04.1 LTS (containerized) CPUs: 1 Total Memory: 1.955 GiB Name: node-0 ID: X666:BXIH:NMHG:5JQX:25FK:I3YT:RARC:ZGGR:4MGO:GZ24:RFI4:LD55 WARNING: No swap limit support Containers: 0 Images: 0 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 0 Dirperm1 Supported: false Execution Driver: native-0.2 Kernel Version: 3.13.0-39-generic Operating System: Ubuntu 14.04.1 LTS (containerized) CPUs: 1 Total Memory: 1.955 GiB Name: node-1 ID: BTWI:FLUI:2MX2:PHQR:T6WB:WEIF:Q4BW:R6CW:O2O7:3YGJ:ISTR:OCBJ WARNING: No swap limit support go install github.com/docker/swarm: build output "/tmp/tmp.rbrZUnW33V" already exists and is not an object file godep: go exit status 1 kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] Stopping 52473afa9c1d8466face2328306842f321cf660c7adaa83cefd2e4025b243daa Stopping ead16971e81eeb7f567ebb4d26f36ee8ae1e7ca74219bd39acdcc84633c07443

1 test, 1 failure

aluzzardi commented 9 years ago

What operating system are you using?

aluzzardi commented 9 years ago

Could you try changing build_swarm in helpers.bash with:

 function build_swarm() {
       [ -x $SWARM_BINARY ] || (rm -f $SWARM_BINARY && cd $SWARM_ROOT && godep go build -o $SWARM_BINARY)
 }

Basically $SWARM_BINARY is created with a mktemp (so the file exists but is not executable). On my system, go happily overwrites that file with the binary but on yours it doesn't.

This should fix it.

snrism commented 9 years ago

@aluzzardi that works. Will you be able to push that change to master or do you want me to add that as part of the dependency.bats pull request?

aluzzardi commented 9 years ago

Sure