Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print logs to debug shutdown integration test #1888

Merged
merged 3 commits into from
Sep 26, 2016
Merged

Conversation

2opremio
Copy link
Contributor

@2opremio 2opremio commented Sep 23, 2016

to track down #1889.

@2opremio
Copy link
Contributor Author

And of course, now the test passes. Sigh ...

Will rebuilt one more time and just merge if it passes again.

@2opremio
Copy link
Contributor Author

It failed on the second attempt: https://circleci.com/gh/weaveworks/scope/5357?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link

>>> Test ./110_shutdown_test.sh finished after 60.1 secs with error: exit status 1
Check scope exits cleanly within 10 seconds
2546fa33c2dd9c04da13e0a49457ab445141411785ec8f0ca5c940ca31da4115
Weave Scope is reachable at the following URL(s):
  * http://10.240.0.6:4040/
<probe> INFO: 2016/09/23 16:18:23.923461 command line args: --logtostderr=true --mode=probe --probe.docker=true
<probe> INFO: 2016/09/23 16:18:23.923672 probe starting, version 7fddaa9, ID 340ff198d57020ff
<probe> INFO: 2016/09/23 16:18:23.923716 publishing to: localhost:4040
<probe> ERRO: 2016/09/23 16:18:23.951093 Error fetching app details: Get http://127.0.0.1:4040/api: dial tcp 127.0.0.1:4040: getsockopt: connection refused
<probe> WARN: 2016/09/23 16:18:23.985040 Cannot resolve scope.weave.local.: dial tcp 172.17.0.1:53: getsockopt: connection refused
<probe> WARN: 2016/09/23 16:18:23.985305 Error collecting weave status, backing off 10s: Get http://127.0.0.1:6784/report: dial tcp 127.0.0.1:6784: getsockopt: connection refused
<probe> INFO: 2016/09/23 16:18:24.137258 Success collecting weave ps
INFO: 2016/09/23 16:18:24.339891 === received SIGINT/SIGTERM ===
*** exiting
<probe> INFO: 2016/09/23 16:18:24.340508 probe exiting
test #1 "docker_on host1-5357-0.us-central1-a.scope-integration-tests logs weavescope 2>&1 | grep 'app exiting' || (docker_on host1-5357-0.us-central1-a.scope-integration-tests logs weavescope 2>&3 ; false)" failed:
    program terminated with code 1 instead of 0
1 of 3 tests failed in 59.903s.

It seems like the app didn't start at all?

@rade
Copy link
Member

rade commented Sep 23, 2016

isn't this just a race between

scope_on $HOST1 launch
scope_on $HOST1 stop

in the test?

Launching is async since runs docker run -d ..., so stop can come along before runsvinit has started one or both of the processes.

A short sleep would 'cure' this.

FWIW, in weave net, launch waits until a status http requests on the container succeeds, or the container stops.

@2opremio
Copy link
Contributor Author

isn't this just a race between

scope_on $HOST1 launch
scope_on $HOST1 stop

Good point, I will add the sleep and try to reproduce.

@2opremio
Copy link
Contributor Author

And as usual @rade was right and the sleep fixed the problem (three runs without failing).

I want to leave the debug output for the future.

@rade PTAL

Copy link
Member

@rade rade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^

@@ -5,12 +5,15 @@
start_suite "Check scope exits cleanly within 10 seconds"

scope_on $HOST1 launch
sleep 10

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

@rade rade assigned 2opremio and unassigned rade Sep 26, 2016
@2opremio 2opremio merged commit e6bb6a4 into master Sep 26, 2016
@2opremio 2opremio deleted the debug-shutdown-test branch September 26, 2016 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants