From d84f3b4343a40a53c65cba8f84d590c918ee4fe4 Mon Sep 17 00:00:00 2001 From: Paul Lorenz Date: Tue, 12 Dec 2023 10:53:57 -0500 Subject: [PATCH] Update changelog. Add entity-change and terminators to stream events. --- CHANGELOG.md | 53 ++++++++++++++++++++++++++++++++ ziti/cmd/fabric/stream_events.go | 17 ++++++++++ 2 files changed, 70 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2ad39d1e..8a45aa06a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,56 @@ +# Release 0.31.3 + +## What's New + +* Services Max Idle Time +* Add/Remove Peer and Transfer Leadership via REST + +## Service Max Idle Time + +A max idle time can now be configured on services. The default value of 0 indicates that no maximum will +be enforced. A circuit is considered idle when no traffic is flowing across through the initiating or +terminating router. + +``` +ziti edge create service test-service --max-idle-time 5m +``` + +Note that the idle time calculation is done on the router, so if max idle time on a service is less +than the configured scan interval on the router, it make take longer than expected for idle circuits +to be removed. + +## Raft Cluster Management via REST + +The controller now allows some Raft cluster management operations to be performed via REST. + +NOTE: If your cluster is not bootstrapped yet, the REST API won't be available. These will only work on a bootstrapped cluster! + +The following operations are now supported: + +* Add member +* Remove member +* Transfer leadership + +``` +ziti fabric raft add-member tls:localhost:6363 +ziti fabric raft add-member tls:localhost:6464 +ziti fabric raft transfer-leadership +ziti fabric raft transfer-leadership ctrl3 +ziti fabric raft remove-member ctrl2 +ziti fabric raft remove-member ctrl3 +``` + +## Component Updates and Bug Fixes + +* github.com/openziti/edge-api: [v0.26.1 -> v0.26.5](https://github.com/openziti/edge-api/compare/v0.26.1...v0.26.5) +* github.com/openziti/ziti: [v0.31.2 -> v0.31.3](https://github.com/openziti/ziti/compare/v0.31.2...v0.31.3) + * [Issue #1544](https://github.com/openziti/ziti/issues/1544) - Support transfer raft leadership via REST + * [Issue #1543](https://github.com/openziti/ziti/issues/1543) - Support add/remove raft peer via REST + * [Issue #1496](https://github.com/openziti/ziti/issues/1496) - Configurable Timer needed to close idle circuits + * [Issue #1402](https://github.com/openziti/ziti/issues/1402) - Allow router to decomission itself + + + # Release 0.31.2 ## What's New diff --git a/ziti/cmd/fabric/stream_events.go b/ziti/cmd/fabric/stream_events.go index 1185b30fa..8dfac7573 100644 --- a/ziti/cmd/fabric/stream_events.go +++ b/ziti/cmd/fabric/stream_events.go @@ -35,12 +35,14 @@ type streamEventsAction struct { all bool apiSessions bool circuits bool + entityChange bool entityCounts bool links bool metrics bool routers bool services bool sessions bool + terminators bool usage bool metricsSourceFilter string @@ -68,12 +70,14 @@ func NewStreamEventsCmd(p common.OptionsProvider) *cobra.Command { streamEventsCmd.Flags().BoolVar(&action.all, "all", false, "Include all events") streamEventsCmd.Flags().BoolVar(&action.apiSessions, "api-sessions", false, "Include api-session events") streamEventsCmd.Flags().BoolVar(&action.circuits, "circuits", false, "Include circuit events") + streamEventsCmd.Flags().BoolVar(&action.entityChange, "entity-change", false, "Include entity change events") streamEventsCmd.Flags().BoolVar(&action.entityCounts, "entity-counts", false, "Include entity count events") streamEventsCmd.Flags().BoolVar(&action.links, "links", false, "Include link events") streamEventsCmd.Flags().BoolVar(&action.metrics, "metrics", false, "Include metrics events") streamEventsCmd.Flags().BoolVar(&action.routers, "routers", false, "Include router events") streamEventsCmd.Flags().BoolVar(&action.services, "services", false, "Include service events") streamEventsCmd.Flags().BoolVar(&action.sessions, "sessions", false, "Include session events") + streamEventsCmd.Flags().BoolVar(&action.terminators, "terminators", false, "Include terminators events") streamEventsCmd.Flags().BoolVar(&action.usage, "usage", false, "Include usage events") streamEventsCmd.Flags().DurationVar(&action.entityCountsInterval, "entity-counts-interval", 5*time.Minute, "Specify the entity count event interval") streamEventsCmd.Flags().StringVar(&action.metricsSourceFilter, "metrics-source-filter", "", "Specify which sources to stream metrics from") @@ -97,6 +101,13 @@ func (self *streamEventsAction) buildSubscriptions(cmd *cobra.Command) []*event. }) } + if self.entityChange || (self.all && !cmd.Flags().Changed("entity-change")) { + subscription := &event.Subscription{ + Type: "entityChange", + } + subscriptions = append(subscriptions, subscription) + } + if self.entityCounts || (self.all && !cmd.Flags().Changed("entity-counts")) { subscription := &event.Subscription{ Type: "edge.entityCounts", @@ -150,6 +161,12 @@ func (self *streamEventsAction) buildSubscriptions(cmd *cobra.Command) []*event. }) } + if self.terminators || (self.all && !cmd.Flags().Changed("terminators")) { + subscriptions = append(subscriptions, &event.Subscription{ + Type: "fabric.terminators", + }) + } + if self.usage || (self.all && !cmd.Flags().Changed("usage")) { subscription := &event.Subscription{ Type: "fabric.usage",