Skip to content
This repository has been archived by the owner on Jul 23, 2019. It is now read-only.

endless loop of test container execution #5

Open
shayts7 opened this issue Sep 27, 2016 · 0 comments
Open

endless loop of test container execution #5

shayts7 opened this issue Sep 27, 2016 · 0 comments

Comments

@shayts7
Copy link
Contributor

shayts7 commented Sep 27, 2016

For test container that register to any docker event - the problem is that execution of test container by tugbot-run trigger events and those events cause tugbot to execute another test container and so on.

Here is debug logs from tugbot:

time="2016-09-27T20:39:10Z" level=debug msg="Docker event: &{Status:die ID:7c05e3bee0e8020c5073c7f7e8d6f0291167a69ad011764c15d818da285c057f From:gaiadocker/example-voting-app-tests:latest Type:container Action:die Actor:{ID:7c05e3bee0e8020c5073c7f7e8d6f0291167a69ad011764c15d818da285c057f Attributes:map[com.docker.compose.project:examplevotingapp exitCode:0 image:gaiadocker/example-voting-app-tests:latest tugbot.results.dir:/src/test-results com.docker.compose.config-hash:f55a97f67bda7ee5e5d4b92e8a7d1d94df172aa648005ae36b9e3cef16852b3d com.docker.compose.container-number:1 com.docker.compose.oneoff:False com.docker.compose.service:votests com.docker.compose.version:1.8.0 name:tugbot_examplevotingapp_votests_1_20160927203905 tugbot.created.from:examplevotingapp_votests_1 tugbot.event.docker:start tugbot.test:true]} Time:1475008750 TimeNano:1475008750810010448}"
time="2016-09-27T20:39:10Z" level=debug msg="Docker event: &{Status: ID: From: Type:network Action:disconnect Actor:{ID:b06036ab251541ad9bea8416cd7ceeeec3680c2edc8cce78de2a78f2c7228633 Attributes:map[container:7c05e3bee0e8020c5073c7f7e8d6f0291167a69ad011764c15d818da285c057f name:examplevotingapp_voteapp type:bridge]} Time:1475008750 TimeNano:1475008750942365408}"
time="2016-09-27T20:39:10Z" level=debug msg="Retrieving containers"
time="2016-09-27T20:39:11Z" level=debug msg="Starting container from examplevotingapp_votests_1"
time="2016-09-27T20:39:11Z" level=info msg="Starting container tugbot_examplevotingapp_votests_1_20160927203911 (726d6f2fda28fb55cbdf272231509f33698a4a9dad8d6858b2409c2c6d50b145)"
time="2016-09-27T20:39:11Z" level=debug msg="Docker event: &{Status:archive-path ID:7c05e3bee0e8020c5073c7f7e8d6f0291167a69ad011764c15d818da285c057f From:gaiadocker/example-voting-app-tests:latest Type:container Action:archive-path Actor:{ID:7c05e3bee0e8020c5073c7f7e8d6f0291167a69ad011764c15d818da285c057f Attributes:map[com.docker.compose.container-number:1 com.docker.compose.service:votests image:gaiadocker/example-voting-app-tests:latest tugbot.created.from:examplevotingapp_votests_1 tugbot.event.docker:start com.docker.compose.config-hash:f55a97f67bda7ee5e5d4b92e8a7d1d94df172aa648005ae36b9e3cef16852b3d com.docker.compose.oneoff:False com.docker.compose.project:examplevotingapp com.docker.compose.version:1.8.0 name:tugbot_examplevotingapp_votests_1_20160927203905 tugbot.results.dir:/src/test-results tugbot.test:true]} Time:1475008751 TimeNano:1475008751022054253}"
time="2016-09-27T20:39:11Z" level=debug msg="Docker event: &{Status:create ID:726d6f2fda28fb55cbdf272231509f33698a4a9dad8d6858b2409c2c6d50b145 From:gaiadocker/example-voting-app-tests:latest Type:container Action:create Actor:{ID:726d6f2fda28fb55cbdf272231509f33698a4a9dad8d6858b2409c2c6d50b145 Attributes:map[com.docker.compose.container-number:1 com.docker.compose.project:examplevotingapp com.docker.compose.service:votests image:gaiadocker/example-voting-app-tests:latest name:tugbot_examplevotingapp_votests_1_20160927203911 tugbot.results.dir:/src/test-results tugbot.test:true com.docker.compose.config-hash:f55a97f67bda7ee5e5d4b92e8a7d1d94df172aa648005ae36b9e3cef16852b3d com.docker.compose.version:1.8.0 tugbot.created.from:examplevotingapp_votests_1 tugbot.event.docker:start com.docker.compose.oneoff:False]} Time:1475008751 TimeNano:1475008751189015080}"
time="2016-09-27T20:39:11Z" level=debug msg="Docker event: &{Status: ID: From: Type:network Action:connect Actor:{ID:b06036ab251541ad9bea8416cd7ceeeec3680c2edc8cce78de2a78f2c7228633 Attributes:map[container:726d6f2fda28fb55cbdf272231509f33698a4a9dad8d6858b2409c2c6d50b145 name:examplevotingapp_voteapp type:bridge]} Time:1475008751 TimeNano:1475008751211761434}"
time="2016-09-27T20:39:11Z" level=debug msg="Retrieving containers"
time="2016-09-27T20:39:11Z" level=debug msg="Starting container from examplevotingapp_votests_1"
time="2016-09-27T20:39:11Z" level=error msg="409 Conflict: Conflict. The name \"/tugbot_examplevotingapp_votests_1_20160927203911\" is already in use by container 726d6f2fda28fb55cbdf272231509f33698a4a9dad8d6858b2409c2c6d50b145. You have to remove (or rename) that container to be able to reuse that name.\n"
time="2016-09-27T20:39:11Z" level=error msg="409 Conflict: Conflict. The name \"/tugbot_examplevotingapp_votests_1_20160927203911\" is already in use by container 726d6f2fda28fb55cbdf272231509f33698a4a9dad8d6858b2409c2c6d50b145. You have to remove (or rename) that container to be able to reuse that name.\n"
time="2016-09-27T20:39:11Z" level=debug msg="Docker event: &{Status:start ID:726d6f2fda28fb55cbdf272231509f33698a4a9dad8d6858b2409c2c6d50b145 From:gaiadocker/example-voting-app-tests:latest Type:container Action:start Actor:{ID:726d6f2fda28fb55cbdf272231509f33698a4a9dad8d6858b2409c2c6d50b145 Attributes:map[com.docker.compose.container-number:1 com.docker.compose.project:examplevotingapp com.docker.compose.version:1.8.0 image:gaiadocker/example-voting-app-tests:latest tugbot.event.docker:start tugbot.results.dir:/src/test-results tugbot.test:true com.docker.compose.config-hash:f55a97f67bda7ee5e5d4b92e8a7d1d94df172aa648005ae36b9e3cef16852b3d com.docker.compose.oneoff:False com.docker.compose.service:votests name:tugbot_examplevotingapp_votests_1_20160927203911 tugbot.created.from:examplevotingapp_votests_1]} Time:1475008751 TimeNano:1475008751729092587}"

tugbot has a mechanism to filter out events that were come due to execution of test containers by tugbot itself, but some events were missed (for instance: "network disconnected"), we need to find a way to ignore all events triggered due to test container execution by tugbot.

The missed events are "network disconnect" and "network connect", but I any test container can trigger more type of events (depends on the container implementation).
"network disconnect" and "network connect" contains the container id, so we can check if that container is not "ours" - we need to see how we can do it without bringing performance penalty + after the fix we should add an integration test to check that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant