Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cluster id, to prevent merging disparate clusters. Fixes #2541 #2542

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
372 changes: 220 additions & 152 deletions common/pb/cmd_pb/cmd.pb.go

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions common/pb/cmd_pb/cmd.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ enum CommandType {
DeleteTerminatorsBatchType = 4;

SyncSnapshot = 10;
InitClusterId = 11;
}

message ChangeContext {
Expand Down Expand Up @@ -76,6 +77,10 @@ message SyncSnapshotCommand {
bytes snapshot = 2;
}

message InitClusterIdCommand {
string clusterId = 1;
}

message DeleteTerminatorsBatchCommand {
repeated string entityIds = 1;
ChangeContext ctx = 2;
Expand Down
4 changes: 4 additions & 0 deletions common/pb/cmd_pb/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ func (x *SyncSnapshotCommand) GetCommandType() int32 {
return int32(CommandType_SyncSnapshot)
}

func (x *InitClusterIdCommand) GetCommandType() int32 {
return int32(CommandType_InitClusterId)
}

func EncodeTags(tags map[string]interface{}) (map[string]*TagValue, error) {
if len(tags) == 0 {
return nil, nil
Expand Down
27 changes: 0 additions & 27 deletions common/pb/ctrl_pb/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package ctrl_pb

import (
"github.com/openziti/channel/v3/protobufs"
"github.com/openziti/ziti/controller/xt"
)

Expand Down Expand Up @@ -110,29 +109,3 @@ func (request *UpdateCtrlAddresses) GetContentType() int32 {
func (request *PeerStateChanges) GetContentType() int32 {
return int32(ContentType_PeerStateChangeRequestType)
}

type FilterableValidateTerminatorsRequest interface {
protobufs.TypedMessage
FilterTerminators(f func(terminator *Terminator) bool)
GetTerminators() []*Terminator
}

func (request *ValidateTerminatorsRequest) FilterTerminators(f func(terminator *Terminator) bool) {
var terminators []*Terminator
for _, terminator := range request.Terminators {
if f(terminator) {
terminators = append(terminators, terminator)
}
}
request.Terminators = terminators
}

func (request *ValidateTerminatorsV2Request) FilterTerminators(f func(terminator *Terminator) bool) {
var terminators []*Terminator
for _, terminator := range request.Terminators {
if f(terminator) {
terminators = append(terminators, terminator)
}
}
request.Terminators = terminators
}
216 changes: 0 additions & 216 deletions common/pb/edge_mgmt_pb/edge_mgmt.pb.go

This file was deleted.

15 changes: 0 additions & 15 deletions common/pb/edge_mgmt_pb/edge_mgmt.proto

This file was deleted.

5 changes: 0 additions & 5 deletions common/pb/edge_mgmt_pb/generate.go

This file was deleted.

5 changes: 0 additions & 5 deletions common/pb/edge_mgmt_pb/impl.go

This file was deleted.

4 changes: 4 additions & 0 deletions common/pb/mgmt_pb/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,7 @@ func (request *ValidateIdentityConnectionStatusesResponse) GetContentType() int3
func (request *RouterIdentityConnectionStatusesDetails) GetContentType() int32 {
return int32(ContentType_ValidateIdentityConnectionStatusesResultType)
}

func (x *InitRequest) GetContentType() int32 {
return int32(ContentType_RaftInit)
}
Loading
Loading