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

Make probes use TLS against scope.weave.works by default #785

Merged
merged 4 commits into from
Jan 4, 2016

Conversation

2opremio
Copy link
Contributor

Also:

  • Fix wss:// for websockets
  • Only target scope.weave.works implicitly if no app is provided

I have tested this against the scope.weave.works (i.e. scope launch --probe-token=foo), and all connections are successful.

Fixes #777

@tomwilkie PTAL and make whatever corrections you think are necessary since I will be away for 3 weeks.

@2opremio
Copy link
Contributor Author

For the record, while testing a probe against scope.weave.works (which still runs Scope Apps with version 0.10.0) it panics when trying to pause a container:

goroutine 46 [running]:
github.com/weaveworks/scope/xfer.(*JSONWebsocketCodec).ReadRequestHeader(0xc8202afe00, 0xc8202afe20, 0x0, 0x0)
        /go/src/github.com/weaveworks/scope/xfer/controls.go:143 +0xa7
net/rpc.(*Server).readRequestHeader(0xc8208eff40, 0x7fa207562820, 0xc8202afe00, 0x0, 0x0, 0xc8202afe20, 0x41ae00, 0x0, 0x0)
        /usr/local/go/src/net/rpc/server.go:576 +0x90
net/rpc.(*Server).readRequest(0xc8208eff40, 0x7fa207562820, 0xc8202afe00, 0xc8206fe180, 0x416f1e, 0x1e1b230, 0x0, 0x0, 0x0, 0x0, ...)
        /usr/local/go/src/net/rpc/server.go:543 +0x8b
net/rpc.(*Server).ServeCodec(0xc8208eff40, 0x7fa207562820, 0xc8202afe00)
        /usr/local/go/src/net/rpc/server.go:462 +0x8c
github.com/weaveworks/scope/xfer.(*appClient).controlConnection(0xc82011eb00, 0x4f9700, 0x0, 0x0)
        /go/src/github.com/weaveworks/scope/xfer/app_client.go:217 +0x482
github.com/weaveworks/scope/xfer.(*appClient).(github.com/weaveworks/scope/xfer.controlConnection)-fm(0xc800000008, 0x0, 0x0)
        /go/src/github.com/weaveworks/scope/xfer/app_client.go:225 +0x2e
github.com/weaveworks/scope/xfer.(*appClient).doWithBackoff(0xc82011eb00, 0x1397400, 0x8, 0xc82011bf58)
        /go/src/github.com/weaveworks/scope/xfer/app_client.go:170 +0x9e
github.com/weaveworks/scope/xfer.(*appClient).ControlConnection.func1(0xc82011eb00)
        /go/src/github.com/weaveworks/scope/xfer/app_client.go:225 +0x22d
created by github.com/weaveworks/scope/xfer.(*appClient).ControlConnection
        /go/src/github.com/weaveworks/scope/xfer/app_client.go:226 +0x35

but this is not really related to this PR since it also happens with master. I believe it's just just a backwards compatibility problem caused by ac9c011#diff-24706e06628363dd12b48d439304a70dR143 which I believe will always panic (it shouldn't though).

Pity, I thought controls were backwards compatible.

@tomwilkie
Copy link
Contributor

LGTM!

tomwilkie added a commit that referenced this pull request Jan 4, 2016
Make probes use TLS against scope.weave.works by default
@tomwilkie tomwilkie merged commit 6850e84 into master Jan 4, 2016
@tomwilkie tomwilkie deleted the 777-probes-https branch January 4, 2016 18:17
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