From edac1fd8c36070ed3abf171ce98d0ea98fb1f851 Mon Sep 17 00:00:00 2001 From: Paul Lorenz Date: Wed, 12 May 2021 15:15:08 -0400 Subject: [PATCH 1/3] Fix host mode service poll and update changelog and deps. Fixes #170 --- CHANGELOG.md | 9 ++++++++- go.mod | 4 ++-- go.sum | 8 ++++---- ziti-tunnel/cmd/ziti-tunnel/subcmd/host.go | 6 ------ ziti-tunnel/cmd/ziti-tunnel/subcmd/root.go | 2 +- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bb8b3487..3e1168e67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# Release 0.20.1 + +## What's New + +* Fix bug in sdk which could cause panic by return nil connection and nil error +* [ziti#170](https://github.com/openziti/ziti/issues/170) Fix service poll refresh default for ziti-tunnel host mode + # Release 0.20.0 ## What's New @@ -466,4 +473,4 @@ Version 0.20 and later report: "meta": {} }. -``` \ No newline at end of file +``` diff --git a/go.mod b/go.mod index dfdfbea81..90bf4868b 100644 --- a/go.mod +++ b/go.mod @@ -27,10 +27,10 @@ require ( github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19 github.com/michaelquigley/pfxlog v0.3.7 - github.com/openziti/edge v0.19.110 + github.com/openziti/edge v0.19.111 github.com/openziti/fabric v0.16.61 github.com/openziti/foundation v0.15.50 - github.com/openziti/sdk-golang v0.15.47 + github.com/openziti/sdk-golang v0.15.48 github.com/pborman/uuid v1.2.0 github.com/pkg/errors v0.9.1 github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 diff --git a/go.sum b/go.sum index fca7edb4a..be2d6e22f 100644 --- a/go.sum +++ b/go.sum @@ -615,14 +615,14 @@ github.com/openziti/bbolt v1.3.6-0.20210317142109-547da822475e h1:ST9+54UtCr96S5 github.com/openziti/bbolt v1.3.6-0.20210317142109-547da822475e/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= github.com/openziti/dilithium v0.3.3 h1:PLgQ6PMNLSTzCFbX/h98cmudgz/cU6TmjdSv5NAPD8k= github.com/openziti/dilithium v0.3.3/go.mod h1:vsCjI2AU/hon9e+dLhUFbCNGesJDj2ASgkySOcpmvjo= -github.com/openziti/edge v0.19.110 h1:YfO0LALYDq/C3cfcd0GXsT/N+HelKZTL81+z8oGrW8I= -github.com/openziti/edge v0.19.110/go.mod h1:us0jeq6JzGMl47FEVNN35WKlD5qPkSr0u7+kaw9oVQU= +github.com/openziti/edge v0.19.111 h1:4giPRy6CIlTp8Jqvq07tyt0pmCmswEClAr0pP+u9Y+w= +github.com/openziti/edge v0.19.111/go.mod h1:iUKYo5AmtkdrtDA08D9METZhMUqgEjx7ahUP+oNxbf0= github.com/openziti/fabric v0.16.61 h1:NtEi9orFtieYPNx6H/XcRHAde1pQKW0gtEov8bsc2aA= github.com/openziti/fabric v0.16.61/go.mod h1:xro2eGr6ilDmz8qZ0sp7KjHMl0KU4l9aOBydGF/tg9E= github.com/openziti/foundation v0.15.50 h1:xvID5CAXNLAb0h9nOXCQr4PlcxlPpnPOnNDoEeyl424= github.com/openziti/foundation v0.15.50/go.mod h1:NnSBTp9ZkcYsv6nYxZR0/NzoHfkIo6tjpBHDvBsPFqw= -github.com/openziti/sdk-golang v0.15.47 h1:6/VUergS4cWcmz4xAn45Q/aTC99steFWsLs3TLdk2Rk= -github.com/openziti/sdk-golang v0.15.47/go.mod h1:T68tkxqOwwcZhzfRjxSK26xe0eWsQ3VeLqi3cLCzQ0M= +github.com/openziti/sdk-golang v0.15.48 h1:dDJOjv5LgRR30GYFLtmpYkB8LJCWlO44ji8EX02PmEY= +github.com/openziti/sdk-golang v0.15.48/go.mod h1:T68tkxqOwwcZhzfRjxSK26xe0eWsQ3VeLqi3cLCzQ0M= github.com/oracle/oci-go-sdk v24.2.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888= github.com/orcaman/concurrent-map v0.0.0-20190826125027-8c72a8bb44f6/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI= github.com/orcaman/concurrent-map v0.0.0-20210106121528-16402b402231 h1:fa50YL1pzKW+1SsBnJDOHppJN9stOEwS+CRWyUtyYGU= diff --git a/ziti-tunnel/cmd/ziti-tunnel/subcmd/host.go b/ziti-tunnel/cmd/ziti-tunnel/subcmd/host.go index c14386bc4..b7ab32460 100644 --- a/ziti-tunnel/cmd/ziti-tunnel/subcmd/host.go +++ b/ziti-tunnel/cmd/ziti-tunnel/subcmd/host.go @@ -19,8 +19,6 @@ package subcmd import ( "github.com/openziti/edge/tunnel/intercept/host" "github.com/spf13/cobra" - "math" - "strconv" ) var runHostCmd = &cobra.Command{ @@ -37,10 +35,6 @@ func init() { } func runHost(_ *cobra.Command, args []string) error { - // Fiddle with the poll rate and resolver settings if the user didn't wan't anything special. - if !root.Flag(svcPollRateFlag).Changed { - _ = root.PersistentFlags().Set(svcPollRateFlag, strconv.FormatUint(math.MaxUint32, 10)) - } if !root.Flag(resolverCfgFlag).Changed { _ = root.PersistentFlags().Set(resolverCfgFlag, "") } diff --git a/ziti-tunnel/cmd/ziti-tunnel/subcmd/root.go b/ziti-tunnel/cmd/ziti-tunnel/subcmd/root.go index b04bd9fda..b9ce2d8b3 100644 --- a/ziti-tunnel/cmd/ziti-tunnel/subcmd/root.go +++ b/ziti-tunnel/cmd/ziti-tunnel/subcmd/root.go @@ -43,7 +43,7 @@ const ( func init() { root.PersistentFlags().BoolP("verbose", "v", false, "Enable verbose mode") root.PersistentFlags().StringP("identity", "i", "", "Path to JSON file that contains an enrolled identity") - root.PersistentFlags().Uint(svcPollRateFlag, 15, "Set poll rate for service updates (seconds)") + root.PersistentFlags().Uint(svcPollRateFlag, 15, "Set poll rate for service updates (seconds). Polling in proxy mode is disabled unless this value is explicitly set") root.PersistentFlags().StringP(resolverCfgFlag, "r", "udp://127.0.0.1:53", "Resolver configuration") root.PersistentFlags().StringVar(&logFormatter, "log-formatter", "", "Specify log formatter [json|pfxlog|text]") root.PersistentFlags().StringP(dnsSvcIpRangeFlag, "d", "100.64.0.1/10", "cidr to use when assigning IPs to unresolvable intercept hostnames") From e4a3f2647eb72a1f91ff8198c7092e14ac5c0e75 Mon Sep 17 00:00:00 2001 From: Paul Lorenz Date: Thu, 13 May 2021 20:51:36 -0400 Subject: [PATCH 2/3] Update deps and changelog --- CHANGELOG.md | 1 + go.mod | 8 ++++---- go.sum | 17 ++++++++--------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e1168e67..b517cf0c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Fix bug in sdk which could cause panic by return nil connection and nil error * [ziti#170](https://github.com/openziti/ziti/issues/170) Fix service poll refresh default for ziti-tunnel host mode +* Fix deadlock in control channel reconnect triggerable when network path to controller is unreliable # Release 0.20.0 diff --git a/go.mod b/go.mod index 90bf4868b..92579bf1c 100644 --- a/go.mod +++ b/go.mod @@ -27,10 +27,10 @@ require ( github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19 github.com/michaelquigley/pfxlog v0.3.7 - github.com/openziti/edge v0.19.111 - github.com/openziti/fabric v0.16.61 - github.com/openziti/foundation v0.15.50 - github.com/openziti/sdk-golang v0.15.48 + github.com/openziti/edge v0.19.113 + github.com/openziti/fabric v0.16.62 + github.com/openziti/foundation v0.15.51 + github.com/openziti/sdk-golang v0.15.49 github.com/pborman/uuid v1.2.0 github.com/pkg/errors v0.9.1 github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 diff --git a/go.sum b/go.sum index be2d6e22f..4bfe4e2c7 100644 --- a/go.sum +++ b/go.sum @@ -376,7 +376,6 @@ github.com/gophercloud/utils v0.0.0-20200508015959-b0167b94122c/go.mod h1:ehWUbL github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/handlers v1.5.0/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -615,14 +614,14 @@ github.com/openziti/bbolt v1.3.6-0.20210317142109-547da822475e h1:ST9+54UtCr96S5 github.com/openziti/bbolt v1.3.6-0.20210317142109-547da822475e/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= github.com/openziti/dilithium v0.3.3 h1:PLgQ6PMNLSTzCFbX/h98cmudgz/cU6TmjdSv5NAPD8k= github.com/openziti/dilithium v0.3.3/go.mod h1:vsCjI2AU/hon9e+dLhUFbCNGesJDj2ASgkySOcpmvjo= -github.com/openziti/edge v0.19.111 h1:4giPRy6CIlTp8Jqvq07tyt0pmCmswEClAr0pP+u9Y+w= -github.com/openziti/edge v0.19.111/go.mod h1:iUKYo5AmtkdrtDA08D9METZhMUqgEjx7ahUP+oNxbf0= -github.com/openziti/fabric v0.16.61 h1:NtEi9orFtieYPNx6H/XcRHAde1pQKW0gtEov8bsc2aA= -github.com/openziti/fabric v0.16.61/go.mod h1:xro2eGr6ilDmz8qZ0sp7KjHMl0KU4l9aOBydGF/tg9E= -github.com/openziti/foundation v0.15.50 h1:xvID5CAXNLAb0h9nOXCQr4PlcxlPpnPOnNDoEeyl424= -github.com/openziti/foundation v0.15.50/go.mod h1:NnSBTp9ZkcYsv6nYxZR0/NzoHfkIo6tjpBHDvBsPFqw= -github.com/openziti/sdk-golang v0.15.48 h1:dDJOjv5LgRR30GYFLtmpYkB8LJCWlO44ji8EX02PmEY= -github.com/openziti/sdk-golang v0.15.48/go.mod h1:T68tkxqOwwcZhzfRjxSK26xe0eWsQ3VeLqi3cLCzQ0M= +github.com/openziti/edge v0.19.113 h1:1oHcIFsB8YGUGb6baXNL+C6rdpgvlBkbaAhEHmgwtTk= +github.com/openziti/edge v0.19.113/go.mod h1:9LJisB1t2/YPlQzAX7wb/iF0RmVmJ1Tj244dUtZc0ak= +github.com/openziti/fabric v0.16.62 h1:feIKQCSkK7+/q0JyUtMwyBZ8my3yhtlOObTBaSTumCM= +github.com/openziti/fabric v0.16.62/go.mod h1:Z43VUQMrSga1N44rD837guAqLdcFlpLMK50kM1WGDAs= +github.com/openziti/foundation v0.15.51 h1:iu+vKDusU6QvW+KBTe4bhTzIOQmRxhBvAsqYxKTSCYk= +github.com/openziti/foundation v0.15.51/go.mod h1:NnSBTp9ZkcYsv6nYxZR0/NzoHfkIo6tjpBHDvBsPFqw= +github.com/openziti/sdk-golang v0.15.49 h1:ZlpufEJzE8XUi6hAHKx0+WxWD8aBgcsocmlrnmNZXJs= +github.com/openziti/sdk-golang v0.15.49/go.mod h1:/8xH6hV9g8bsJNfM6FYhPC6SU4qKs2UGXh3CsQ5sIu4= github.com/oracle/oci-go-sdk v24.2.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888= github.com/orcaman/concurrent-map v0.0.0-20190826125027-8c72a8bb44f6/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI= github.com/orcaman/concurrent-map v0.0.0-20210106121528-16402b402231 h1:fa50YL1pzKW+1SsBnJDOHppJN9stOEwS+CRWyUtyYGU= From 21c41d271e87152b425ff82ba184627b7f2d0257 Mon Sep 17 00:00:00 2001 From: Paul Lorenz Date: Thu, 13 May 2021 22:13:53 -0400 Subject: [PATCH 3/3] changelog tidying --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b517cf0c5..9c7444f65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,9 @@ ## What's New -* Fix bug in sdk which could cause panic by return nil connection and nil error -* [ziti#170](https://github.com/openziti/ziti/issues/170) Fix service poll refresh default for ziti-tunnel host mode -* Fix deadlock in control channel reconnect triggerable when network path to controller is unreliable +* Fixes a bug in the GO sdk which could cause panic by return nil connection and nil error +* [ziti#170](https://github.com/openziti/ziti/issues/170) Fixes the service poll refresh default for ziti-tunnel host mode +* Fixes a deadlock in control channel reconnect logic triggerable when network path to controller is unreliable # Release 0.20.0