diff --git a/prog/weaver/http.go b/prog/weaver/http.go index 05bc0fe5..2d815939 100644 --- a/prog/weaver/http.go +++ b/prog/weaver/http.go @@ -211,7 +211,7 @@ var targetsTemplate = defTemplate("targetsTemplate", `\ var connectionsTemplate = defTemplate("connectionsTemplate", `\ {{range .Router.Connections}}\ -{{if .Outbound}}->{{else}}<-{{end}} {{printf "%-21v" .Address}} {{printf "%-11v" .State}} {{.Info}} +{{if .Outbound}}->{{else}}<-{{end}} {{printf "%-21v" .Address}} {{printf "%-11v" .State}} {{.Info}} {{range $key,$element := .Attrs}}{{if ne $key "name"}}{{$key}}={{$element}}{{end}}{{end}} {{end}}\ `) diff --git a/router/awsvpc.go b/router/awsvpc.go index 59c64c97..84cd14a8 100644 --- a/router/awsvpc.go +++ b/router/awsvpc.go @@ -32,8 +32,8 @@ func (conn *AWSVPCConnection) Stop() {} func (conn *AWSVPCConnection) ControlMessage(tag byte, msg []byte) { } -func (conn *AWSVPCConnection) DisplayName() string { - return "awsvpc" +func (conn *AWSVPCConnection) Attrs() map[string]interface{} { + return map[string]interface{}{"name": "awsvpc"} } // OverlayForwarder diff --git a/router/fastdp.go b/router/fastdp.go index 6627cd4e..1d4fe9aa 100644 --- a/router/fastdp.go +++ b/router/fastdp.go @@ -771,8 +771,8 @@ func (fwd *fastDatapathForwarder) ControlMessage(tag byte, msg []byte) { } } -func (fwd *fastDatapathForwarder) DisplayName() string { - return "fastdp" +func (fwd *fastDatapathForwarder) Attrs() map[string]interface{} { + return map[string]interface{}{"name": "fastdp", "mtu": fwd.fastdp.iface.MTU} } func (fwd *fastDatapathForwarder) handleHeartbeatAck() { diff --git a/router/overlay_switch.go b/router/overlay_switch.go index 553b9fdc..8031ceb5 100644 --- a/router/overlay_switch.go +++ b/router/overlay_switch.go @@ -424,7 +424,7 @@ func (fwd *overlaySwitchForwarder) ControlMessage(tag byte, msg []byte) { } } -func (fwd *overlaySwitchForwarder) DisplayName() string { +func (fwd *overlaySwitchForwarder) Attrs() map[string]interface{} { var best OverlayForwarder fwd.lock.Lock() @@ -434,8 +434,8 @@ func (fwd *overlaySwitchForwarder) DisplayName() string { fwd.lock.Unlock() if best != nil { - return best.DisplayName() + return best.Attrs() } - return "none" + return nil } diff --git a/router/sleeve.go b/router/sleeve.go index 29bbc910..4857ccf0 100644 --- a/router/sleeve.go +++ b/router/sleeve.go @@ -606,8 +606,8 @@ func (fwd *sleeveForwarder) ControlMessage(tag byte, msg []byte) { } } -func (fwd *sleeveForwarder) DisplayName() string { - return "sleeve" +func (fwd *sleeveForwarder) Attrs() map[string]interface{} { + return map[string]interface{}{"name": "sleeve", "mtu": fwd.mtu} } func (fwd *sleeveForwarder) Stop() { diff --git a/site/troubleshooting.md b/site/troubleshooting.md index b5c2d2b0..b2630525 100644 --- a/site/troubleshooting.md +++ b/site/troubleshooting.md @@ -131,7 +131,7 @@ To view detailed information on the local Weave Net router's type `weave status ``` $ weave status connections -<- 192.168.48.12:33866 established unencrypted fastdp 7e:21:4a:70:2f:45(host2) +<- 192.168.48.12:33866 established unencrypted fastdp 7e:21:4a:70:2f:45(host2) mtu=1410 <- 192.168.48.13:60773 pending encrypted fastdp 7e:ae:cd:d5:23:8d(host3) -> 192.168.48.14:6783 retrying dial tcp4 192.168.48.14:6783: no route to host -> 192.168.48.15:6783 failed dial tcp4 192.168.48.15:6783: no route to host, retry: 2015-08-06 18:55:38.246910357 +0000 UTC @@ -153,7 +153,7 @@ The columns are as follows: * `established` - TCP connection and corresponding UDP path are up * Info - the failure reason for failed and retrying connections, or the encryption mode, data transport method, remote peer name and - nickname for pending and established connections + nickname for pending and established connections, mtu if known ### List Peers diff --git a/test/700_status_and_report_test.sh b/test/700_status_and_report_2_test.sh similarity index 94% rename from test/700_status_and_report_test.sh rename to test/700_status_and_report_2_test.sh index 8875d3e4..fab9a1a7 100755 --- a/test/700_status_and_report_test.sh +++ b/test/700_status_and_report_2_test.sh @@ -9,6 +9,7 @@ start_suite "weave status/report" weave_on $HOST1 launch --ipalloc-range $UNIVERSE --name 8a:3e:3e:3e:3e:3e --nickname nicknamington +weave_on $HOST2 launch --ipalloc-range $UNIVERSE check() { assert "weave_on $HOST1 status | grep -oP '(?<= $1: ).*'" "$3" @@ -27,6 +28,9 @@ assert_raises "weave_on $HOST1 report | grep nicknamington" weave_on $HOST1 connect 10.2.2.1 assert "weave_on $HOST1 status targets" "10.2.2.1" assert "weave_on $HOST1 status connections | tr -s ' ' | cut -d ' ' -f 2" "10.2.2.1:6783" +weave_on $HOST1 connect $HOST2 +sleep 1 +assert "weave_on $HOST1 status connections | grep -q 'mtu=1410'" assert "weave_on $HOST1 report -f '{{.VersionCheck.Enabled}}'" "false" assert_raises "weave_on $HOST1 status | grep 'version check update disabled'" diff --git a/vendor/github.com/weaveworks/mesh b/vendor/github.com/weaveworks/mesh index 3dd75b10..ce181c22 160000 --- a/vendor/github.com/weaveworks/mesh +++ b/vendor/github.com/weaveworks/mesh @@ -1 +1 @@ -Subproject commit 3dd75b104a40feb6f8ef7f6eef3bbfb0e3500403 +Subproject commit ce181c2282f84e0bb59e1a98ed6b1894c03dae87