diff --git a/CHANGELOG.md b/CHANGELOG.md index a04bc7718..8c49851f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,17 @@ # Release 0.22.0 +# What's New + +* Refactor: Fabric Sessions renamed to Circuits (breaking change) +* Feature: Links will now wait for a timeout for retrying +* Bug fix: Sessions created on the controller when circuit creation fails are now cleaned up +* Feature: Enhanced `ziti` CLI login functionality (has breaking changes to CLI options) +* Feature: new `ziti edge list summary` command, which shows database entity counts +* Bug fix: ziti-fabric didn't always report an error to the OS when it had an error +* Refactor: All protobuf packages have been prefixed with `ziti.` to help prevent namespace clashes. Should not be a breaking change. + ## Breaking Changes -Fabric sessions renamed to circuits. See below for details. +Fabric sessions renamed to circuits. External integrators may be impacted by changes to events. See below for details. Commands under `ziti edge` now reserve the `-i` flag for specifying client identity. Any command line argumet which previously had a `-i` short version now only has a long version. @@ -25,14 +35,6 @@ The `ziti edge` commands now store session credentials in a new location and new The `ziti edge controller` command was previously deprecated and has now been removed. All commands that were previously available under `ziti edge controller` are available under `ziti edge`. -# What's New - -* Refactor: Fabric Sessions renamed to Circuits -* Feature: Links will now wait for a timeout for retrying -* Bug fix: Sessions created on the controller when circuit creation fails are now cleaned up -* Feature: Enhanced `ziti` CLI login functionality -* Feature: new `ziti edge list summary` command, which shows database entity counts - ## Fabric Sessions renamed to Circuits Previously we had three separate entities named session: fabric sessions, edge sessions and edge API sessions. In order to reduce confusion, fabric sessions have been renamed to circuits. This has the following impacts: @@ -49,6 +51,25 @@ have been renamed to circuits. This has the following impacts: In the context of the fabric there was an existing construct call `Circuit` which has now been renamed to `Path`. This may be visible in a few `ziti-fabric` CLI outputs +### Event changes +Previously the fabric had session events. It now has circuit events instead. These events have the `fabric.circuits` namespace. The `circuitUpdated` event type +is now the `pathUpdated` event. + +``` +type CircuitEvent struct { + Namespace string `json:"namespace"` + EventType string `json:"event_type"` + CircuitId string `json:"circuit_id"` + Timestamp time.Time `json:"timestamp"` + ClientId string `json:"client_id"` + ServiceId string `json:"service_id"` + Path string `json:"circuit"` +} +``` + +Additionally the Usage events now have `circuit_id` instead of `session_id`. The usage events also have a new `version` field, which is set to 2. + + # Pending Link Timeout Previously whenever a router connected we'd look for new links possiblities and create new links between routers where any were missing. If lots of routers connected at the same time, we might create duplicate links because the links hadn't been reported as established yet. diff --git a/go.mod b/go.mod index 56e6e45d3..aa86833c9 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/MakeNowJust/heredoc v1.0.0 github.com/blang/semver v3.5.1+incompatible github.com/fatih/color v1.7.0 - github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa // indirect + github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa github.com/go-acme/lego/v4 v4.2.0 github.com/go-openapi/runtime v0.19.29 github.com/go-openapi/strfmt v0.20.1 @@ -29,11 +29,11 @@ require ( github.com/gorilla/mux v1.8.0 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.6.0 - github.com/openziti/edge v0.20.8 - github.com/openziti/fabric v0.16.84 - github.com/openziti/foundation v0.15.65 - github.com/openziti/sdk-golang v0.15.73 + github.com/michaelquigley/pfxlog v0.6.1 + github.com/openziti/edge v0.20.11 + github.com/openziti/fabric v0.16.88 + github.com/openziti/foundation v0.15.67 + github.com/openziti/sdk-golang v0.15.77 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 b500c0d2f..5098f6eae 100644 --- a/go.sum +++ b/go.sum @@ -338,8 +338,9 @@ github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= -github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= +github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= +github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -609,8 +610,9 @@ github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyex github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI= github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/michaelquigley/pfxlog v0.3.1/go.mod h1:pwJmJ9nN787xk9U+0z8/5nP2GMhU6GGCTfgBWGpiXaQ= -github.com/michaelquigley/pfxlog v0.6.0 h1:Veo0IM2mQ127bd8XAm+EqPzgzIDQ0Zu1cwpHFsLrIL4= github.com/michaelquigley/pfxlog v0.6.0/go.mod h1:z864Y2uU0O4QA5OoclXIOdoX5Tme2zm66FLAJ+R1jZs= +github.com/michaelquigley/pfxlog v0.6.1 h1:Ip/5LQchoyFp/MSvdYjFzy6fSsDt2DV4CEl72w/v29g= +github.com/michaelquigley/pfxlog v0.6.1/go.mod h1:z864Y2uU0O4QA5OoclXIOdoX5Tme2zm66FLAJ+R1jZs= github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.31/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= @@ -677,14 +679,17 @@ 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.20.8 h1:5MiqedRzx2AH+YDazV85v0q+78Vc9eqB44pfXxnOUuo= -github.com/openziti/edge v0.20.8/go.mod h1:J1ZVM0nOamuLZ/J1jClwVPaJzBrZdhAynJhpCcg4HLU= -github.com/openziti/fabric v0.16.84 h1:4LthxZk7wrHZ8nO6GesI/d89aLlmfAoZWmNlC+4Fxsg= -github.com/openziti/fabric v0.16.84/go.mod h1:2Y6bOG67R9n9XTvnIFz8A+oc+9pX+h6pDmbDZKot1Hk= -github.com/openziti/foundation v0.15.65 h1:s8xOYQ271uN+G+PHWXhZ9jOFoqrkeWyB3fY1uxE/OYA= -github.com/openziti/foundation v0.15.65/go.mod h1:ksnMJvct0z7WtQk2fdz00vDUfN4SuDEbxgOvIiHysI8= -github.com/openziti/sdk-golang v0.15.73 h1:BouaCcjt8DNibq8wB5fkoSceTk9QqtTyw0h2Snp8oYI= -github.com/openziti/sdk-golang v0.15.73/go.mod h1:qdGTdtVUHQG08gBk9u9YySM76IXXHrOfAFlIPmkul6M= +github.com/openziti/edge v0.20.11 h1:yhIdSGjsEF6DFeXGgFmRR0s96mP1yG1wBh+vjEOgEdg= +github.com/openziti/edge v0.20.11/go.mod h1:xcQES1RBtsqgcP5iI6inC/eQz33HZRHZ6Bd4zZ04l3M= +github.com/openziti/fabric v0.16.86/go.mod h1:J8Y+bjHoSD0sXFSTUba+RGJ3P1YT6pPpPIvQtc9NPJM= +github.com/openziti/fabric v0.16.88 h1:awBCSynkzf+9TdconrIjPc0dPGCQil0FWgu2jCZVMiU= +github.com/openziti/fabric v0.16.88/go.mod h1:/6x+qy2xZdzkYvP+yDsKXPNsWkbUUGwmikF5LEinX6c= +github.com/openziti/foundation v0.15.66/go.mod h1:03nGRyp9bOrKm4KEjvXN//g4c/E1qtT/2M77Hfi78lY= +github.com/openziti/foundation v0.15.67 h1:Zj2oEkhOlf/FhxmZQ4QAjX5jRcquejNT1gCm/RQLvdw= +github.com/openziti/foundation v0.15.67/go.mod h1:Njk4vQbg6ILR/RQiU5DQOk35oMulQRPGHLn386+RSew= +github.com/openziti/sdk-golang v0.15.75/go.mod h1:Peez3s/zjaLfYTyEmnOQY/nbjFvpZtpYyeY9m20YJmc= +github.com/openziti/sdk-golang v0.15.77 h1:Vl3Ub/z3edJ8hLOfztmCNgIcwtqQH9vKEQFd7x673pA= +github.com/openziti/sdk-golang v0.15.77/go.mod h1:hn4/6DIwjR6Te1lHXsP5Plc3hbZtQvHLLseqklT/ywI= 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-fabric/subcmd/root.go b/ziti-fabric/subcmd/root.go index 723ab96a5..6df8f6377 100644 --- a/ziti-fabric/subcmd/root.go +++ b/ziti-fabric/subcmd/root.go @@ -20,6 +20,7 @@ import ( "fmt" "github.com/sirupsen/logrus" "github.com/spf13/cobra" + "os" ) func init() { @@ -80,6 +81,7 @@ var updateCmd = &cobra.Command{ func Execute() { if err := Root.Execute(); err != nil { - fmt.Printf("error: %s", err) + fmt.Printf("error: %s\n", err) + os.Exit(1) } }