Merge branch 'main' into elastic-nofiles

This commit is contained in:
Felipe Madero
2023-05-03 10:14:09 -03:00
9 changed files with 1144 additions and 1066 deletions
+1 -1
View File
@@ -165,7 +165,7 @@ func (c *client) TransformElasticSubnets(ctx context.Context, elasticSubnetSpecs
}
c.log.Info("transform subnets")
return c.controlc.TransformElasticSubnet(ctx, req)
return c.controlc.TransformElasticSubnets(ctx, req)
}
func (c *client) Health(ctx context.Context) (*rpcpb.HealthResponse, error) {
+1064 -996
View File
File diff suppressed because it is too large Load Diff
+14 -14
View File
@@ -167,7 +167,7 @@ func local_request_ControlService_CreateBlockchains_0(ctx context.Context, marsh
}
func request_ControlService_TransformElasticSubnet_0(ctx context.Context, marshaler runtime.Marshaler, client ControlServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
func request_ControlService_TransformElasticSubnets_0(ctx context.Context, marshaler runtime.Marshaler, client ControlServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq TransformElasticSubnetsRequest
var metadata runtime.ServerMetadata
@@ -179,12 +179,12 @@ func request_ControlService_TransformElasticSubnet_0(ctx context.Context, marsha
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.TransformElasticSubnet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
msg, err := client.TransformElasticSubnets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_ControlService_TransformElasticSubnet_0(ctx context.Context, marshaler runtime.Marshaler, server ControlServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
func local_request_ControlService_TransformElasticSubnets_0(ctx context.Context, marshaler runtime.Marshaler, server ControlServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq TransformElasticSubnetsRequest
var metadata runtime.ServerMetadata
@@ -196,7 +196,7 @@ func local_request_ControlService_TransformElasticSubnet_0(ctx context.Context,
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.TransformElasticSubnet(ctx, &protoReq)
msg, err := server.TransformElasticSubnets(ctx, &protoReq)
return msg, metadata, err
}
@@ -919,7 +919,7 @@ func RegisterControlServiceHandlerServer(ctx context.Context, mux *runtime.Serve
})
mux.Handle("POST", pattern_ControlService_TransformElasticSubnet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle("POST", pattern_ControlService_TransformElasticSubnets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -927,12 +927,12 @@ func RegisterControlServiceHandlerServer(ctx context.Context, mux *runtime.Serve
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/rpcpb.ControlService/TransformElasticSubnet", runtime.WithHTTPPathPattern("/v1/control/transformelasticsubnet"))
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/rpcpb.ControlService/TransformElasticSubnets", runtime.WithHTTPPathPattern("/v1/control/transformelasticsubnet"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_ControlService_TransformElasticSubnet_0(annotatedContext, inboundMarshaler, server, req, pathParams)
resp, md, err := local_request_ControlService_TransformElasticSubnets_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -940,7 +940,7 @@ func RegisterControlServiceHandlerServer(ctx context.Context, mux *runtime.Serve
return
}
forward_ControlService_TransformElasticSubnet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
forward_ControlService_TransformElasticSubnets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1554,25 +1554,25 @@ func RegisterControlServiceHandlerClient(ctx context.Context, mux *runtime.Serve
})
mux.Handle("POST", pattern_ControlService_TransformElasticSubnet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle("POST", pattern_ControlService_TransformElasticSubnets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/rpcpb.ControlService/TransformElasticSubnet", runtime.WithHTTPPathPattern("/v1/control/transformelasticsubnet"))
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/rpcpb.ControlService/TransformElasticSubnets", runtime.WithHTTPPathPattern("/v1/control/transformelasticsubnet"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_ControlService_TransformElasticSubnet_0(annotatedContext, inboundMarshaler, client, req, pathParams)
resp, md, err := request_ControlService_TransformElasticSubnets_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_ControlService_TransformElasticSubnet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
forward_ControlService_TransformElasticSubnets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1982,7 +1982,7 @@ var (
pattern_ControlService_CreateBlockchains_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "control", "createblockchains"}, ""))
pattern_ControlService_TransformElasticSubnet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "control", "transformelasticsubnet"}, ""))
pattern_ControlService_TransformElasticSubnets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "control", "transformelasticsubnet"}, ""))
pattern_ControlService_CreateSubnets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "control", "createsubnets"}, ""))
@@ -2028,7 +2028,7 @@ var (
forward_ControlService_CreateBlockchains_0 = runtime.ForwardResponseMessage
forward_ControlService_TransformElasticSubnet_0 = runtime.ForwardResponseMessage
forward_ControlService_TransformElasticSubnets_0 = runtime.ForwardResponseMessage
forward_ControlService_CreateSubnets_0 = runtime.ForwardResponseMessage
+10 -3
View File
@@ -43,7 +43,7 @@ service ControlService {
};
}
rpc TransformElasticSubnet(TransformElasticSubnetsRequest) returns (TransformElasticSubnetsResponse) {
rpc TransformElasticSubnets(TransformElasticSubnetsRequest) returns (TransformElasticSubnetsResponse) {
option (google.api.http) = {
post: "/v1/control/transformelasticsubnet"
body: "*"
@@ -195,8 +195,15 @@ message ClusterInfo {
bool custom_chains_healthy = 7;
// The map of blockchain IDs in "ids.ID" format to its blockchain information.
map<string, CustomChainInfo> custom_chains = 8;
repeated string subnets = 9;
map<string, SubnetParticipants> subnet_participants = 10;
map<string, SubnetInfo> subnets = 9;
}
message SubnetInfo {
// If Subnet is an Elastic Subnet
bool is_elastic = 1;
// node validators of subnet
SubnetParticipants subnet_participants = 2;
}
message CustomChainInfo {
+34 -34
View File
@@ -109,28 +109,28 @@ var PingService_ServiceDesc = grpc.ServiceDesc{
}
const (
ControlService_RPCVersion_FullMethodName = "/rpcpb.ControlService/RPCVersion"
ControlService_Start_FullMethodName = "/rpcpb.ControlService/Start"
ControlService_CreateBlockchains_FullMethodName = "/rpcpb.ControlService/CreateBlockchains"
ControlService_TransformElasticSubnet_FullMethodName = "/rpcpb.ControlService/TransformElasticSubnet"
ControlService_CreateSubnets_FullMethodName = "/rpcpb.ControlService/CreateSubnets"
ControlService_Health_FullMethodName = "/rpcpb.ControlService/Health"
ControlService_URIs_FullMethodName = "/rpcpb.ControlService/URIs"
ControlService_WaitForHealthy_FullMethodName = "/rpcpb.ControlService/WaitForHealthy"
ControlService_Status_FullMethodName = "/rpcpb.ControlService/Status"
ControlService_StreamStatus_FullMethodName = "/rpcpb.ControlService/StreamStatus"
ControlService_RemoveNode_FullMethodName = "/rpcpb.ControlService/RemoveNode"
ControlService_AddNode_FullMethodName = "/rpcpb.ControlService/AddNode"
ControlService_RestartNode_FullMethodName = "/rpcpb.ControlService/RestartNode"
ControlService_PauseNode_FullMethodName = "/rpcpb.ControlService/PauseNode"
ControlService_ResumeNode_FullMethodName = "/rpcpb.ControlService/ResumeNode"
ControlService_Stop_FullMethodName = "/rpcpb.ControlService/Stop"
ControlService_AttachPeer_FullMethodName = "/rpcpb.ControlService/AttachPeer"
ControlService_SendOutboundMessage_FullMethodName = "/rpcpb.ControlService/SendOutboundMessage"
ControlService_SaveSnapshot_FullMethodName = "/rpcpb.ControlService/SaveSnapshot"
ControlService_LoadSnapshot_FullMethodName = "/rpcpb.ControlService/LoadSnapshot"
ControlService_RemoveSnapshot_FullMethodName = "/rpcpb.ControlService/RemoveSnapshot"
ControlService_GetSnapshotNames_FullMethodName = "/rpcpb.ControlService/GetSnapshotNames"
ControlService_RPCVersion_FullMethodName = "/rpcpb.ControlService/RPCVersion"
ControlService_Start_FullMethodName = "/rpcpb.ControlService/Start"
ControlService_CreateBlockchains_FullMethodName = "/rpcpb.ControlService/CreateBlockchains"
ControlService_TransformElasticSubnets_FullMethodName = "/rpcpb.ControlService/TransformElasticSubnets"
ControlService_CreateSubnets_FullMethodName = "/rpcpb.ControlService/CreateSubnets"
ControlService_Health_FullMethodName = "/rpcpb.ControlService/Health"
ControlService_URIs_FullMethodName = "/rpcpb.ControlService/URIs"
ControlService_WaitForHealthy_FullMethodName = "/rpcpb.ControlService/WaitForHealthy"
ControlService_Status_FullMethodName = "/rpcpb.ControlService/Status"
ControlService_StreamStatus_FullMethodName = "/rpcpb.ControlService/StreamStatus"
ControlService_RemoveNode_FullMethodName = "/rpcpb.ControlService/RemoveNode"
ControlService_AddNode_FullMethodName = "/rpcpb.ControlService/AddNode"
ControlService_RestartNode_FullMethodName = "/rpcpb.ControlService/RestartNode"
ControlService_PauseNode_FullMethodName = "/rpcpb.ControlService/PauseNode"
ControlService_ResumeNode_FullMethodName = "/rpcpb.ControlService/ResumeNode"
ControlService_Stop_FullMethodName = "/rpcpb.ControlService/Stop"
ControlService_AttachPeer_FullMethodName = "/rpcpb.ControlService/AttachPeer"
ControlService_SendOutboundMessage_FullMethodName = "/rpcpb.ControlService/SendOutboundMessage"
ControlService_SaveSnapshot_FullMethodName = "/rpcpb.ControlService/SaveSnapshot"
ControlService_LoadSnapshot_FullMethodName = "/rpcpb.ControlService/LoadSnapshot"
ControlService_RemoveSnapshot_FullMethodName = "/rpcpb.ControlService/RemoveSnapshot"
ControlService_GetSnapshotNames_FullMethodName = "/rpcpb.ControlService/GetSnapshotNames"
)
// ControlServiceClient is the client API for ControlService service.
@@ -140,7 +140,7 @@ type ControlServiceClient interface {
RPCVersion(ctx context.Context, in *RPCVersionRequest, opts ...grpc.CallOption) (*RPCVersionResponse, error)
Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*StartResponse, error)
CreateBlockchains(ctx context.Context, in *CreateBlockchainsRequest, opts ...grpc.CallOption) (*CreateBlockchainsResponse, error)
TransformElasticSubnet(ctx context.Context, in *TransformElasticSubnetsRequest, opts ...grpc.CallOption) (*TransformElasticSubnetsResponse, error)
TransformElasticSubnets(ctx context.Context, in *TransformElasticSubnetsRequest, opts ...grpc.CallOption) (*TransformElasticSubnetsResponse, error)
CreateSubnets(ctx context.Context, in *CreateSubnetsRequest, opts ...grpc.CallOption) (*CreateSubnetsResponse, error)
Health(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthResponse, error)
URIs(ctx context.Context, in *URIsRequest, opts ...grpc.CallOption) (*URIsResponse, error)
@@ -196,9 +196,9 @@ func (c *controlServiceClient) CreateBlockchains(ctx context.Context, in *Create
return out, nil
}
func (c *controlServiceClient) TransformElasticSubnet(ctx context.Context, in *TransformElasticSubnetsRequest, opts ...grpc.CallOption) (*TransformElasticSubnetsResponse, error) {
func (c *controlServiceClient) TransformElasticSubnets(ctx context.Context, in *TransformElasticSubnetsRequest, opts ...grpc.CallOption) (*TransformElasticSubnetsResponse, error) {
out := new(TransformElasticSubnetsResponse)
err := c.cc.Invoke(ctx, ControlService_TransformElasticSubnet_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, ControlService_TransformElasticSubnets_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
@@ -397,7 +397,7 @@ type ControlServiceServer interface {
RPCVersion(context.Context, *RPCVersionRequest) (*RPCVersionResponse, error)
Start(context.Context, *StartRequest) (*StartResponse, error)
CreateBlockchains(context.Context, *CreateBlockchainsRequest) (*CreateBlockchainsResponse, error)
TransformElasticSubnet(context.Context, *TransformElasticSubnetsRequest) (*TransformElasticSubnetsResponse, error)
TransformElasticSubnets(context.Context, *TransformElasticSubnetsRequest) (*TransformElasticSubnetsResponse, error)
CreateSubnets(context.Context, *CreateSubnetsRequest) (*CreateSubnetsResponse, error)
Health(context.Context, *HealthRequest) (*HealthResponse, error)
URIs(context.Context, *URIsRequest) (*URIsResponse, error)
@@ -432,8 +432,8 @@ func (UnimplementedControlServiceServer) Start(context.Context, *StartRequest) (
func (UnimplementedControlServiceServer) CreateBlockchains(context.Context, *CreateBlockchainsRequest) (*CreateBlockchainsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateBlockchains not implemented")
}
func (UnimplementedControlServiceServer) TransformElasticSubnet(context.Context, *TransformElasticSubnetsRequest) (*TransformElasticSubnetsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method TransformElasticSubnet not implemented")
func (UnimplementedControlServiceServer) TransformElasticSubnets(context.Context, *TransformElasticSubnetsRequest) (*TransformElasticSubnetsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method TransformElasticSubnets not implemented")
}
func (UnimplementedControlServiceServer) CreateSubnets(context.Context, *CreateSubnetsRequest) (*CreateSubnetsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateSubnets not implemented")
@@ -556,20 +556,20 @@ func _ControlService_CreateBlockchains_Handler(srv interface{}, ctx context.Cont
return interceptor(ctx, in, info, handler)
}
func _ControlService_TransformElasticSubnet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
func _ControlService_TransformElasticSubnets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TransformElasticSubnetsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ControlServiceServer).TransformElasticSubnet(ctx, in)
return srv.(ControlServiceServer).TransformElasticSubnets(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ControlService_TransformElasticSubnet_FullMethodName,
FullMethod: ControlService_TransformElasticSubnets_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControlServiceServer).TransformElasticSubnet(ctx, req.(*TransformElasticSubnetsRequest))
return srv.(ControlServiceServer).TransformElasticSubnets(ctx, req.(*TransformElasticSubnetsRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -921,8 +921,8 @@ var ControlService_ServiceDesc = grpc.ServiceDesc{
Handler: _ControlService_CreateBlockchains_Handler,
},
{
MethodName: "TransformElasticSubnet",
Handler: _ControlService_TransformElasticSubnet_Handler,
MethodName: "TransformElasticSubnets",
Handler: _ControlService_TransformElasticSubnets_Handler,
},
{
MethodName: "CreateSubnets",
+6 -8
View File
@@ -71,9 +71,7 @@ type localNetwork struct {
stopCh chan struct{}
stopOnce sync.Once
subnets []string
// map from subnet ID to list of participating node ids
subnetParticipants map[string][]string
subnets map[string]*rpcpb.SubnetInfo
prometheusConfPath string
}
@@ -132,7 +130,7 @@ func newLocalNetwork(opts localNetworkOptions) (*localNetwork, error) {
customChainIDToInfo: make(map[ids.ID]chainInfo),
stopCh: make(chan struct{}),
nodeInfos: make(map[string]*rpcpb.NodeInfo),
subnetParticipants: make(map[string][]string),
subnets: make(map[string]*rpcpb.SubnetInfo),
}, nil
}
@@ -463,14 +461,14 @@ func (lc *localNetwork) updateSubnetInfo(ctx context.Context) error {
return err
}
lc.subnets = []string{}
subnetIDList := []string{}
for _, subnet := range subnets {
if subnet.ID != avago_constants.PlatformChainID {
lc.subnets = append(lc.subnets, subnet.ID.String())
subnetIDList = append(subnetIDList, subnet.ID.String())
}
}
for _, subnetID := range lc.subnets {
for _, subnetID := range subnetIDList {
createdSubnetID, err := ids.FromString(subnetID)
if err != nil {
return err
@@ -488,7 +486,7 @@ func (lc *localNetwork) updateSubnetInfo(ctx context.Context) error {
}
}
}
lc.subnetParticipants[subnetID] = nodeNameList
lc.subnets[subnetID] = &rpcpb.SubnetInfo{IsElastic: false, SubnetParticipants: &rpcpb.SubnetParticipants{NodeNames: nodeNameList}}
}
for chainID, chainInfo := range lc.customChainIDToInfo {
+3 -6
View File
@@ -401,10 +401,6 @@ func (s *server) updateClusterInfo() {
s.clusterInfo.CustomChains[chainID.String()] = chainInfo.info
}
s.clusterInfo.Subnets = s.network.subnets
s.clusterInfo.SubnetParticipants = make(map[string]*rpcpb.SubnetParticipants)
for subnetID, nodes := range s.network.subnetParticipants {
s.clusterInfo.SubnetParticipants[subnetID] = &rpcpb.SubnetParticipants{NodeNames: nodes}
}
}
// wait until some of this conditions is met:
@@ -486,7 +482,8 @@ func (s *server) CreateBlockchains(
// check that the given subnets exist
subnetsSet := set.Set[string]{}
subnetsSet.Add(s.clusterInfo.Subnets...)
subnetIDsList := maps.Keys(s.clusterInfo.Subnets)
subnetsSet.Add(subnetIDsList...)
for _, chainSpec := range chainSpecs {
if chainSpec.SubnetID != nil && !subnetsSet.Contains(*chainSpec.SubnetID) {
@@ -546,7 +543,7 @@ func (s *server) TransformElasticSubnet(
// check that the given subnets exist
subnetsSet := set.Set[string]{}
subnetsSet.Add(s.clusterInfo.Subnets...)
subnetsSet.Add(maps.Keys(s.clusterInfo.Subnets)...)
for _, elasticSubnetSpec := range elasticSubnetSpecList {
if elasticSubnetSpec.SubnetID == nil {
+10 -3
View File
@@ -9,10 +9,13 @@ import (
"flag"
"os"
"path/filepath"
"sort"
"strings"
"testing"
"time"
"golang.org/x/exp/maps"
"github.com/ava-labs/avalanche-network-runner/server"
"github.com/ava-labs/avalanche-network-runner/utils"
"github.com/ava-labs/avalanchego/api/admin"
@@ -247,7 +250,8 @@ var _ = ginkgo.Describe("[Start/Remove/Restart/Add/Stop]", func() {
defer cancel()
status, err := cli.Status(ctx)
gomega.Ω(err).Should(gomega.BeNil())
subnetIDs := status.ClusterInfo.GetSubnets()
subnetIDs := maps.Keys(status.ClusterInfo.Subnets)
sort.Strings(subnetIDs)
createdSubnetIDString := subnetIDs[0]
subnetHasCorrectParticipants := utils.VerifySubnetHasCorrectParticipants(log, existingNodes, status.ClusterInfo, createdSubnetIDString)
gomega.Ω(subnetHasCorrectParticipants).Should(gomega.Equal(true))
@@ -965,7 +969,7 @@ var _ = ginkgo.Describe("[Start/Remove/Restart/Add/Stop]", func() {
gomega.Ω(err).Should(gomega.BeNil())
numSubnets := len(status.ClusterInfo.Subnets)
gomega.Ω(numSubnets).Should(gomega.Equal(5))
originalSubnets = status.ClusterInfo.Subnets
originalSubnets = maps.Keys(status.ClusterInfo.Subnets)
})
ginkgo.By("check there are no snapshots", func() {
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)
@@ -1011,7 +1015,10 @@ var _ = ginkgo.Describe("[Start/Remove/Restart/Add/Stop]", func() {
status, err := cli.Status(ctx)
cancel()
gomega.Ω(err).Should(gomega.BeNil())
gomega.Ω(status.ClusterInfo.Subnets).Should(gomega.Equal(originalSubnets))
subnetIDs := maps.Keys(status.ClusterInfo.Subnets)
sort.Strings(subnetIDs)
sort.Strings(originalSubnets)
gomega.Ω(subnetIDs).Should(gomega.Equal(originalSubnets))
})
ginkgo.By("save fail for already saved snapshot", func() {
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)
+2 -1
View File
@@ -100,7 +100,8 @@ func VerifySubnetHasCorrectParticipants(
subnetID string,
) bool {
if cluster != nil {
participatingNodeNames := cluster.SubnetParticipants[subnetID].GetNodeNames()
participatingNodeNames := cluster.Subnets[subnetID].GetSubnetParticipants().GetNodeNames()
var nodeIsInList bool
// Check that all subnet validators are equal to the node IDs added as participant in subnet creation
for _, node := range subnetParticipants {