From 7c600ad049fa8e6da20ee90609912b393678369a Mon Sep 17 00:00:00 2001 From: Michael Quigley Date: Wed, 3 Mar 2021 15:18:18 -0500 Subject: [PATCH 1/6] Builds for idle_route_gc. --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 4158b7ae2..a9a81cacb 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ go 1.15 //replace github.com/michaelquigley/dilithium => ../../q/research/dilithium -//replace github.com/openziti/fabric => ../fabric +replace github.com/openziti/fabric => ../fabric //replace github.com/openziti/sdk-golang => ../sdk-golang From f3ec831d5da3430dff4302b9a6d8e423ed9bb832 Mon Sep 17 00:00:00 2001 From: Paul Lorenz Date: Wed, 10 Mar 2021 20:28:09 -0500 Subject: [PATCH 2/6] Update deps and changelog --- CHANGELOG.md | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ go.mod | 4 ++-- go.sum | 8 ++++---- 3 files changed, 59 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 289e19a9d..57055814f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,56 @@ +# Release 0.19.6 + +## What's New + +* Service Event Counters +* New log message which shows local (router side) address, including port, when router dials are + successful. This allows correlating server side access logs with ziti logs + +## Service Event Counters + +There are new events emitted for service, with statistics for how many dials are successful, failed, +timed out, or fail for non-dial related reasons. Stats are aggregated per-minute, similar to usage +statistics. They can be enabled in the controller config as follows: + +```yaml +events: + jsonLogger: + subscriptions: + - type: services + handler: + type: file + format: json + path: /tmp/ziti-events.log +``` + +Example of the events JSON output: + +```json +{ + "namespace": "service.events", + "event_type": "service.dial.fail", + "service_id": "HSfgHzIom", + "count": 8, + "interval_start_utc": 1615400160, + "interval_length": 60 +} +{ + "namespace": "service.events", + "event_type": "service.dial.success", + "service_id": "HSfgHzIom", + "count": 29, + "interval_start_utc": 1615400160, + "interval_length": 60 +} +``` + +Event types: + +* `service.dial.success` +* `service.dial.fail` +* `service.dial.timeout` +* `service.dial.error_other` + # Release 0.19.5 ## What's New diff --git a/go.mod b/go.mod index 3b0ce9a18..7cd0b1118 100644 --- a/go.mod +++ b/go.mod @@ -25,8 +25,8 @@ 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.23 - github.com/openziti/fabric v0.16.21 + github.com/openziti/edge v0.19.27 + github.com/openziti/fabric v0.16.24 github.com/openziti/foundation v0.15.35 github.com/openziti/sdk-golang v0.15.21 github.com/pborman/uuid v1.2.0 diff --git a/go.sum b/go.sum index b41f052ff..61b79a5b7 100644 --- a/go.sum +++ b/go.sum @@ -620,10 +620,10 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openziti/edge v0.19.23 h1:GItC2J895vAwyKQg2Eo6WKbMAzrUVHD2aghn3wJs8og= -github.com/openziti/edge v0.19.23/go.mod h1:vqCg6hcr502MPGbDqib6GNjZyYgte3fq9bWAISO9Zn0= -github.com/openziti/fabric v0.16.21 h1:bRKj094+5cUdx4bF+mF5JbKBS77K0ywNeDhy5PSMSDk= -github.com/openziti/fabric v0.16.21/go.mod h1:iF5BPXp+MceayRx11hJV885EofqP6f4/xyW5dCupKYQ= +github.com/openziti/edge v0.19.27 h1:KCopaqhptJ/HCQcW+pqPkV2FCpzFmILc77Vxv1wxo1w= +github.com/openziti/edge v0.19.27/go.mod h1:Vd1/e++L26XVR1tlmV4su8IEfua7bHBpdcK3J5SDURs= +github.com/openziti/fabric v0.16.24 h1:IzPLF/rn6sZzchbJOEIryYY9zlIX2ondome24p3hz/A= +github.com/openziti/fabric v0.16.24/go.mod h1:iF5BPXp+MceayRx11hJV885EofqP6f4/xyW5dCupKYQ= github.com/openziti/foundation v0.15.35 h1:FYL2TNKqRzXVN70XhU15Nw2OrWnd5Lbz0hz4heVsxqg= github.com/openziti/foundation v0.15.35/go.mod h1:0vyGpNqnK/WuVhUE1Kfq+UvCWIf/rUYViMrCrCZ2cTc= github.com/openziti/sdk-golang v0.15.21 h1:HeBvSXTSFixV1D8EdioNiO9nvGdqvIsxxx4Rkrs2ZLA= From ae486643e14f7daa3ca39ff65d181db5bd71355d Mon Sep 17 00:00:00 2001 From: Paul Lorenz Date: Thu, 11 Mar 2021 14:19:44 -0500 Subject: [PATCH 3/6] Update to go 1.16 and add mattermost ziti webhook --- .github/workflows/main.yml | 6 ++--- .github/workflows/mattermost-ziti-webhook.yml | 23 +++++++++++++++++++ CHANGELOG.md | 6 +++++ go.mod | 2 +- 4 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/mattermost-ziti-webhook.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8c719b501..14abf628d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: - name: Install Go uses: actions/setup-go@v2 with: - go-version: '^1.15.0' + go-version: '^1.16.1' - name: Install Ziti CI uses: netfoundry/ziti-ci@v1 @@ -52,7 +52,7 @@ jobs: - name: Install Go uses: actions/setup-go@v2 with: - go-version: '^1.15.0' + go-version: '^1.16.1' - name: Install Ziti CI uses: netfoundry/ziti-ci@v1 @@ -81,7 +81,7 @@ jobs: - name: Install Go uses: actions/setup-go@v2 with: - go-version: '^1.15.0' + go-version: '^1.16.1' - name: Install Ziti CI uses: netfoundry/ziti-ci@v1 diff --git a/.github/workflows/mattermost-ziti-webhook.yml b/.github/workflows/mattermost-ziti-webhook.yml new file mode 100644 index 000000000..93205e9af --- /dev/null +++ b/.github/workflows/mattermost-ziti-webhook.yml @@ -0,0 +1,23 @@ +name: mattermost-ziti-webhook +on: + create: + delete: + issues: + issue_comment: + pull_request_review: + pull_request_review_comment: + pull_request: + push: + fork: + release: + +jobs: + mattermost-ziti-webhook: + runs-on: macos-latest + name: POST Webhook + steps: + - uses: openziti/ziti-webhook-action@main + with: + ziti-id: ${{ secrets.ZITI_MATTERMOST_IDENTITY }} + webhook-url: ${{ secrets.ZITI_MATTERMOST_WEBHOOK_URL }} + webhook-secret: ${{ secrets.ZITI_MATTERMOSTI_WEBHOOK_SECRET }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 57055814f..3934bbe04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# Release 0.19.7 + +## What's New + +* Update to Golang 1.16 + # Release 0.19.6 ## What's New diff --git a/go.mod b/go.mod index 7cd0b1118..5430859a7 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/openziti/ziti -go 1.15 +go 1.16 //replace github.com/openziti/foundation => ../foundation From 073454543d4da9512833d7866a4191ae4c218adf Mon Sep 17 00:00:00 2001 From: Michael Quigley Date: Fri, 12 Mar 2021 16:01:23 -0500 Subject: [PATCH 4/6] Update dependencies. --- go.mod | 6 +++--- go.sum | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 1d45afb32..f733e17d1 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ go 1.16 //replace github.com/michaelquigley/dilithium => ../../q/research/dilithium -replace github.com/openziti/fabric => ../fabric +//replace github.com/openziti/fabric => ../fabric //replace github.com/openziti/sdk-golang => ../sdk-golang @@ -25,8 +25,8 @@ 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.27 - github.com/openziti/fabric v0.16.24 + github.com/openziti/edge v0.19.32 + github.com/openziti/fabric v0.16.27 github.com/openziti/foundation v0.15.35 github.com/openziti/sdk-golang v0.15.21 github.com/pborman/uuid v1.2.0 diff --git a/go.sum b/go.sum index 61b79a5b7..97b16b046 100644 --- a/go.sum +++ b/go.sum @@ -620,10 +620,10 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openziti/edge v0.19.27 h1:KCopaqhptJ/HCQcW+pqPkV2FCpzFmILc77Vxv1wxo1w= -github.com/openziti/edge v0.19.27/go.mod h1:Vd1/e++L26XVR1tlmV4su8IEfua7bHBpdcK3J5SDURs= -github.com/openziti/fabric v0.16.24 h1:IzPLF/rn6sZzchbJOEIryYY9zlIX2ondome24p3hz/A= -github.com/openziti/fabric v0.16.24/go.mod h1:iF5BPXp+MceayRx11hJV885EofqP6f4/xyW5dCupKYQ= +github.com/openziti/edge v0.19.32 h1:66e9qAMALX3y8XsOF5+AXSSvhDDDrfnO8T16z9taKaw= +github.com/openziti/edge v0.19.32/go.mod h1:9QOQtG0uNsfRlt2jtJalPEYYbALrz27NykztBMxX7qc= +github.com/openziti/fabric v0.16.27 h1:/7hzhjm5X7pWLm/2aXM9YZyU2JSRhQ0KNEVt125FArk= +github.com/openziti/fabric v0.16.27/go.mod h1:jjIq2i9XcSmaGpYAkm8lX/0JVeSycAF3Zi9SaXSEDkE= github.com/openziti/foundation v0.15.35 h1:FYL2TNKqRzXVN70XhU15Nw2OrWnd5Lbz0hz4heVsxqg= github.com/openziti/foundation v0.15.35/go.mod h1:0vyGpNqnK/WuVhUE1Kfq+UvCWIf/rUYViMrCrCZ2cTc= github.com/openziti/sdk-golang v0.15.21 h1:HeBvSXTSFixV1D8EdioNiO9nvGdqvIsxxx4Rkrs2ZLA= From d091db70fd7c3f31811910c65e542bb72131e913 Mon Sep 17 00:00:00 2001 From: Michael Quigley Date: Fri, 12 Mar 2021 16:06:46 -0500 Subject: [PATCH 5/6] CHANGELOG. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3934bbe04..56215238a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## What's New * Update to Golang 1.16 +* Idle route garbage collection: orphaned routing table entries will be garbage collected. New + infrastructure for session confirmation facilitating additional types of garbage collection # Release 0.19.6 From 61b36c3ef136d38239caaaf53ca9e60237a6daf3 Mon Sep 17 00:00:00 2001 From: Michael Quigley Date: Fri, 12 Mar 2021 16:13:03 -0500 Subject: [PATCH 6/6] Example config and changelog. --- CHANGELOG.md | 31 +++++++++++++++++++++++++++++++ etc/001.yml | 13 +++++++++++++ 2 files changed, 44 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56215238a..754d48d4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,37 @@ * Update to Golang 1.16 * Idle route garbage collection: orphaned routing table entries will be garbage collected. New infrastructure for session confirmation facilitating additional types of garbage collection +* Configurable Xgress dial "dwell time" + +### Idle Route Garbage Collection + +The following router configuration stanza controls idle route garbage collection: + +``` +forwarder: + # + # After how many milliseconds of inactivity is a forwarding table entry considered idle? + # + idleSessionTimeout: 60000 + # + # How frequently will we confirm idle sessions with the controller? + # + idleTxInterval: 60000 +``` + +### Xgress Dial Dwell Time + +The following router configuration stanza controls Xgress dial "dwell time". You probably don't want to +use this unless you're debugging a timing-related issue in the overlay: + +``` +forwarder: + # + # (Debugging) Xgress dial "dwell time". When dialing, the Xgress framework will wait this number of milliseconds + # before responding in the affirmative to the controller. + # + xgressDialDwellTime: 0 +``` # Release 0.19.6 diff --git a/etc/001.yml b/etc/001.yml index a8b1f2716..209e95d1e 100644 --- a/etc/001.yml +++ b/etc/001.yml @@ -21,6 +21,14 @@ forwarder: # latencyProbeTimeout: 10000 # + # After how many milliseconds of inactivity is a forwarding table entry considered idle? + # + idleSessionTimeout: 60000 + # + # How frequently will we confirm idle sessions with the controller? + # + idleTxInterval: 60000 + # # How many xgress dials can be queued for processing by the xgress dial workers. An xgress dial occurs # for services that have a terminator egress specified with an xgress binding (e.g. transport) # (minimum 1, max 10000, default 1000) @@ -42,6 +50,11 @@ forwarder: # (minimum 1, max 10000, default 10) # linkDialWorkerCount: 10 + # + # (Debugging) Xgress dial "dwell time". When dialing, the Xgress framework will wait this number of milliseconds + # before responding in the affirmative to the controller. + # + xgressDialDwellTime: 0 #trace: # path: 001.trace