diff --git a/seaweed-block/cmd/blockmaster/main.go b/seaweed-block/cmd/blockmaster/main.go index 55ab0aef85..044fed9439 100644 --- a/seaweed-block/cmd/blockmaster/main.go +++ b/seaweed-block/cmd/blockmaster/main.go @@ -49,6 +49,7 @@ type flags struct { launcherCHAPSecretName string launcherCHAPUserKey string launcherCHAPSecretKey string + failbackRuntimeRPC bool version bool // printReadyLine: test-only flag that emits a single // structured JSON line to stdout after the gRPC listener is @@ -89,6 +90,7 @@ func parseFlags(args []string) (flags, error) { fs.StringVar(&f.launcherCHAPSecretName, "launcher-iscsi-chap-secret-name", "", "optional Kubernetes Secret name used by generated blockvolume Deployments for target-side iSCSI CHAP") fs.StringVar(&f.launcherCHAPUserKey, "launcher-iscsi-chap-username-key", "chapUsername", "Kubernetes Secret key for generated blockvolume iSCSI CHAP username") fs.StringVar(&f.launcherCHAPSecretKey, "launcher-iscsi-chap-secret-key", "chapSecret", "Kubernetes Secret key for generated blockvolume iSCSI CHAP secret") + fs.BoolVar(&f.failbackRuntimeRPC, "failback-runtime-rpc", false, "enable disabled-by-default authority failback RPC; requires expected-current and terminal evidence") fs.BoolVar(&f.version, "version", false, "print build provenance and exit") fs.BoolVar(&f.printReadyLine, "t0-print-ready", false, "internal test-only: emit one structured JSON line on stdout after listener bound") fs.SetOutput(os.Stderr) @@ -142,12 +144,13 @@ func run(f flags) int { fmt.Fprintln(os.Stderr, "blockmaster: dynamic lifecycle topology enabled by cluster-spec node inventory; assignments will be derived from verified placement intents") } cfg := master.Config{ - AuthorityStoreDir: f.authorityStore, - LifecycleStoreDir: f.lifecycleStore, - Listen: f.listen, - Topology: topo, - Freshness: authority.FreshnessConfig{FreshnessWindow: f.freshnessWindow, PendingGrace: f.pendingGrace}, - ControllerConfig: authority.TopologyControllerConfig{ExpectedSlotsPerVolume: f.expectedSlotsPerVol}, + AuthorityStoreDir: f.authorityStore, + LifecycleStoreDir: f.lifecycleStore, + Listen: f.listen, + Topology: topo, + Freshness: authority.FreshnessConfig{FreshnessWindow: f.freshnessWindow, PendingGrace: f.pendingGrace}, + ControllerConfig: authority.TopologyControllerConfig{ExpectedSlotsPerVolume: f.expectedSlotsPerVol}, + FailbackRuntimeRPC: f.failbackRuntimeRPC, } h, err := master.New(cfg) if err != nil { diff --git a/seaweed-block/cmd/blockmaster/main_test.go b/seaweed-block/cmd/blockmaster/main_test.go index abdd8914fd..74881ff482 100644 --- a/seaweed-block/cmd/blockmaster/main_test.go +++ b/seaweed-block/cmd/blockmaster/main_test.go @@ -51,6 +51,28 @@ func TestParseFlags_LifecyclePlacementSeedOptional(t *testing.T) { } } +func TestParseFlags_FailbackRuntimeRPCDisabledByDefault(t *testing.T) { + f, err := parseFlags([]string{ + "--authority-store", "authority-dir", + }) + if err != nil { + t.Fatalf("parseFlags: %v", err) + } + if f.failbackRuntimeRPC { + t.Fatal("failback runtime RPC must be disabled by default") + } + f, err = parseFlags([]string{ + "--authority-store", "authority-dir", + "--failback-runtime-rpc", + }) + if err != nil { + t.Fatalf("parseFlags with failback runtime RPC: %v", err) + } + if !f.failbackRuntimeRPC { + t.Fatal("failback runtime RPC flag not set") + } +} + func TestParseFlags_ClusterSpecOptional(t *testing.T) { f, err := parseFlags([]string{ "--authority-store", "authority-dir", @@ -148,4 +170,12 @@ func TestBlockmasterBareTopologyRegistersVolumeControlServices(t *testing.T) { if status.Code(err) == codes.Unavailable || status.Code(err) == codes.DeadlineExceeded { t.Fatalf("transport error while checking AssignmentService registration: %v", err) } + + _, err = control.NewFailbackServiceClient(conn).ExecuteFailback(ctx, &control.FailbackRequest{VolumeId: "vol-a"}) + if status.Code(err) == codes.Unimplemented || strings.Contains(err.Error(), "unknown service") { + t.Fatalf("FailbackService not registered on bare blockmaster: %v", err) + } + if status.Code(err) != codes.FailedPrecondition { + t.Fatalf("ExecuteFailback default-disabled code=%s err=%v", status.Code(err), err) + } } diff --git a/seaweed-block/core/host/master/failback_runtime_test.go b/seaweed-block/core/host/master/failback_runtime_test.go index 570f6dee62..d4f43941a7 100644 --- a/seaweed-block/core/host/master/failback_runtime_test.go +++ b/seaweed-block/core/host/master/failback_runtime_test.go @@ -5,6 +5,9 @@ import ( "testing" "github.com/seaweedfs/seaweed-block/core/authority" + control "github.com/seaweedfs/seaweed-block/core/rpc/control" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) func TestHostFailbackAuthorityRuntimeUsesLivePublisher(t *testing.T) { @@ -54,3 +57,84 @@ func TestHostFailbackAuthorityRuntimeUsesLivePublisher(t *testing.T) { t.Fatalf("line=%+v current=%+v", line, current) } } + +func TestFailbackServiceDefaultDisabled(t *testing.T) { + h := newTestMaster(t, t.TempDir()) + defer closeTestMaster(t, h) + + _, err := newServices(h).ExecuteFailback(context.Background(), &control.FailbackRequest{ + VolumeId: "vol-a", + ReplicaId: "r1", + TargetDataAddr: "127.0.0.1:9201", + TargetCtrlAddr: "127.0.0.1:9101", + ExpectedCurrentReplicaId: "r2", + ExpectedCurrentEpoch: 1, + AckEligible: true, + FrontendFencedBeforeFailback: true, + DurableFrontierCovered: true, + NoCrossVolumeIdentityChange: true, + }) + if status.Code(err) != codes.FailedPrecondition { + t.Fatalf("err=%v code=%s", err, status.Code(err)) + } + if _, ok := h.Publisher().VolumeAuthorityLine("vol-a"); ok { + t.Fatalf("disabled failback RPC mutated authority") + } +} + +func TestFailbackServiceEnabledUsesHostRuntime(t *testing.T) { + h := newTestMasterWithFailbackRuntimeRPC(t) + defer closeTestMaster(t, h) + seedVerifiedExistingReplicaPlacement(t, h) + if _, err := h.RunLifecycleProductTick(); err != nil { + t.Fatalf("product tick: %v", err) + } + current := waitAuthorityLine(t, h.Publisher(), "vol-a") + + resp, err := newServices(h).ExecuteFailback(context.Background(), &control.FailbackRequest{ + VolumeId: "vol-a", + ReplicaId: "r1", + TargetDataAddr: "127.0.0.1:9201", + TargetCtrlAddr: "127.0.0.1:9101", + ExpectedCurrentReplicaId: current.ReplicaID, + ExpectedCurrentEpoch: current.Epoch, + AckEligible: true, + FrontendFencedBeforeFailback: true, + DurableFrontierCovered: true, + NoCrossVolumeIdentityChange: true, + EvidenceRefs: []string{"phase81-service-test"}, + }) + if err != nil { + t.Fatalf("ExecuteFailback: %v", err) + } + if !resp.GetFailbackStarted() || + !resp.GetAuthorityEpochAdvanced() || + !resp.GetSinglePrimaryAfterFailback() || + !resp.GetPublishTargetSwappedAfterFailback() || + !resp.GetNoStorageMutation() || + !resp.GetNoCrossVolumeIdentityChange() { + t.Fatalf("resp=%+v", resp) + } + line, ok := h.Publisher().VolumeAuthorityLine("vol-a") + if !ok { + t.Fatalf("missing authority line after service failback") + } + if line.ReplicaID != "r1" || line.Epoch != current.Epoch+1 { + t.Fatalf("line=%+v current=%+v", line, current) + } +} + +func newTestMasterWithFailbackRuntimeRPC(t *testing.T) *Host { + t.Helper() + h, err := New(Config{ + AuthorityStoreDir: t.TempDir(), + LifecycleStoreDir: t.TempDir(), + Listen: "127.0.0.1:0", + FailbackRuntimeRPC: true, + }) + if err != nil { + t.Fatalf("master.New: %v", err) + } + h.Start() + return h +} diff --git a/seaweed-block/core/host/master/host.go b/seaweed-block/core/host/master/host.go index 63a866f80b..80f34e0d4b 100644 --- a/seaweed-block/core/host/master/host.go +++ b/seaweed-block/core/host/master/host.go @@ -59,6 +59,11 @@ type Config struct { // NOT drive assignment publication. LifecycleStoreDir string + // FailbackRuntimeRPC enables the authority failback RPC surface. It is + // disabled by default; callers must still provide expected-current and + // terminal evidence when enabled. + FailbackRuntimeRPC bool + // Logger is used for structured startup and error logging. If // nil, the default log package logger is used. Logger *log.Logger @@ -214,6 +219,7 @@ func New(cfg Config) (*Host, error) { control.RegisterEvidenceServiceServer(grpcSrv, svc) control.RegisterClusterEvidenceServiceServer(grpcSrv, svc) control.RegisterLifecycleServiceServer(grpcSrv, svc) + control.RegisterFailbackServiceServer(grpcSrv, svc) h.grpc = grpcSrv lg.Printf("blockmaster: lock acquired, reloaded=%d, listen=%s", diff --git a/seaweed-block/core/host/master/services.go b/seaweed-block/core/host/master/services.go index 6c2f157882..0c9aa34ed9 100644 --- a/seaweed-block/core/host/master/services.go +++ b/seaweed-block/core/host/master/services.go @@ -34,6 +34,7 @@ type services struct { control.UnimplementedEvidenceServiceServer control.UnimplementedClusterEvidenceServiceServer control.UnimplementedLifecycleServiceServer + control.UnimplementedFailbackServiceServer host *Host // seq is incremented per ReportHeartbeat handler invocation. @@ -87,6 +88,37 @@ func (s *services) DeleteVolume(ctx context.Context, req *control.DeleteVolumeRe return &control.DeleteVolumeResponse{}, nil } +func (s *services) ExecuteFailback(ctx context.Context, req *control.FailbackRequest) (*control.FailbackResponse, error) { + if !s.host.cfg.FailbackRuntimeRPC { + return nil, status.Error(codes.FailedPrecondition, "failback runtime RPC is disabled") + } + result, err := s.host.FailbackAuthorityRuntime().ExecuteFailback(ctx, authority.FailbackRuntimeRequest{ + VolumeID: req.GetVolumeId(), + ReplicaID: req.GetReplicaId(), + TargetDataAddr: req.GetTargetDataAddr(), + TargetCtrlAddr: req.GetTargetCtrlAddr(), + ExpectedCurrentReplicaID: req.GetExpectedCurrentReplicaId(), + ExpectedCurrentEpoch: req.GetExpectedCurrentEpoch(), + AckEligible: req.GetAckEligible(), + FrontendFencedBeforeFailback: req.GetFrontendFencedBeforeFailback(), + DurableFrontierCovered: req.GetDurableFrontierCovered(), + NoCrossVolumeIdentityChange: req.GetNoCrossVolumeIdentityChange(), + EvidenceRefs: append([]string(nil), req.GetEvidenceRefs()...), + }) + if err != nil { + return nil, status.Errorf(codes.FailedPrecondition, "execute failback: %v", err) + } + return &control.FailbackResponse{ + FailbackStarted: result.FailbackStarted, + AuthorityEpochAdvanced: result.AuthorityEpochAdvanced, + SinglePrimaryAfterFailback: result.SinglePrimaryAfterFailback, + PublishTargetSwappedAfterFailback: result.PublishTargetSwappedAfterFailback, + NoStorageMutation: result.NoStorageMutation, + NoCrossVolumeIdentityChange: result.NoCrossVolumeIdentityChange, + EvidenceRefs: append([]string(nil), result.EvidenceRefs...), + }, nil +} + // ReportHeartbeat receives a volume's observation. It validates // field presence (rejects malformed reports), translates to // authority.HeartbeatMessage, and calls the observation host's diff --git a/seaweed-block/core/rpc/control/control.pb.go b/seaweed-block/core/rpc/control/control.pb.go index ea45f6afe8..f7947a0b91 100644 --- a/seaweed-block/core/rpc/control/control.pb.go +++ b/seaweed-block/core/rpc/control/control.pb.go @@ -2380,6 +2380,228 @@ func (*DeleteVolumeResponse) Descriptor() ([]byte, []int) { return file_control_proto_rawDescGZIP(), []int{26} } +type FailbackRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` + ReplicaId string `protobuf:"bytes,2,opt,name=replica_id,json=replicaId,proto3" json:"replica_id,omitempty"` + TargetDataAddr string `protobuf:"bytes,3,opt,name=target_data_addr,json=targetDataAddr,proto3" json:"target_data_addr,omitempty"` + TargetCtrlAddr string `protobuf:"bytes,4,opt,name=target_ctrl_addr,json=targetCtrlAddr,proto3" json:"target_ctrl_addr,omitempty"` + ExpectedCurrentReplicaId string `protobuf:"bytes,5,opt,name=expected_current_replica_id,json=expectedCurrentReplicaId,proto3" json:"expected_current_replica_id,omitempty"` + ExpectedCurrentEpoch uint64 `protobuf:"varint,6,opt,name=expected_current_epoch,json=expectedCurrentEpoch,proto3" json:"expected_current_epoch,omitempty"` + AckEligible bool `protobuf:"varint,7,opt,name=ack_eligible,json=ackEligible,proto3" json:"ack_eligible,omitempty"` + FrontendFencedBeforeFailback bool `protobuf:"varint,8,opt,name=frontend_fenced_before_failback,json=frontendFencedBeforeFailback,proto3" json:"frontend_fenced_before_failback,omitempty"` + DurableFrontierCovered bool `protobuf:"varint,9,opt,name=durable_frontier_covered,json=durableFrontierCovered,proto3" json:"durable_frontier_covered,omitempty"` + NoCrossVolumeIdentityChange bool `protobuf:"varint,10,opt,name=no_cross_volume_identity_change,json=noCrossVolumeIdentityChange,proto3" json:"no_cross_volume_identity_change,omitempty"` + EvidenceRefs []string `protobuf:"bytes,11,rep,name=evidence_refs,json=evidenceRefs,proto3" json:"evidence_refs,omitempty"` +} + +func (x *FailbackRequest) Reset() { + *x = FailbackRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_control_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FailbackRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FailbackRequest) ProtoMessage() {} + +func (x *FailbackRequest) ProtoReflect() protoreflect.Message { + mi := &file_control_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FailbackRequest.ProtoReflect.Descriptor instead. +func (*FailbackRequest) Descriptor() ([]byte, []int) { + return file_control_proto_rawDescGZIP(), []int{27} +} + +func (x *FailbackRequest) GetVolumeId() string { + if x != nil { + return x.VolumeId + } + return "" +} + +func (x *FailbackRequest) GetReplicaId() string { + if x != nil { + return x.ReplicaId + } + return "" +} + +func (x *FailbackRequest) GetTargetDataAddr() string { + if x != nil { + return x.TargetDataAddr + } + return "" +} + +func (x *FailbackRequest) GetTargetCtrlAddr() string { + if x != nil { + return x.TargetCtrlAddr + } + return "" +} + +func (x *FailbackRequest) GetExpectedCurrentReplicaId() string { + if x != nil { + return x.ExpectedCurrentReplicaId + } + return "" +} + +func (x *FailbackRequest) GetExpectedCurrentEpoch() uint64 { + if x != nil { + return x.ExpectedCurrentEpoch + } + return 0 +} + +func (x *FailbackRequest) GetAckEligible() bool { + if x != nil { + return x.AckEligible + } + return false +} + +func (x *FailbackRequest) GetFrontendFencedBeforeFailback() bool { + if x != nil { + return x.FrontendFencedBeforeFailback + } + return false +} + +func (x *FailbackRequest) GetDurableFrontierCovered() bool { + if x != nil { + return x.DurableFrontierCovered + } + return false +} + +func (x *FailbackRequest) GetNoCrossVolumeIdentityChange() bool { + if x != nil { + return x.NoCrossVolumeIdentityChange + } + return false +} + +func (x *FailbackRequest) GetEvidenceRefs() []string { + if x != nil { + return x.EvidenceRefs + } + return nil +} + +type FailbackResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FailbackStarted bool `protobuf:"varint,1,opt,name=failback_started,json=failbackStarted,proto3" json:"failback_started,omitempty"` + AuthorityEpochAdvanced bool `protobuf:"varint,2,opt,name=authority_epoch_advanced,json=authorityEpochAdvanced,proto3" json:"authority_epoch_advanced,omitempty"` + SinglePrimaryAfterFailback bool `protobuf:"varint,3,opt,name=single_primary_after_failback,json=singlePrimaryAfterFailback,proto3" json:"single_primary_after_failback,omitempty"` + PublishTargetSwappedAfterFailback bool `protobuf:"varint,4,opt,name=publish_target_swapped_after_failback,json=publishTargetSwappedAfterFailback,proto3" json:"publish_target_swapped_after_failback,omitempty"` + NoStorageMutation bool `protobuf:"varint,5,opt,name=no_storage_mutation,json=noStorageMutation,proto3" json:"no_storage_mutation,omitempty"` + NoCrossVolumeIdentityChange bool `protobuf:"varint,6,opt,name=no_cross_volume_identity_change,json=noCrossVolumeIdentityChange,proto3" json:"no_cross_volume_identity_change,omitempty"` + EvidenceRefs []string `protobuf:"bytes,7,rep,name=evidence_refs,json=evidenceRefs,proto3" json:"evidence_refs,omitempty"` +} + +func (x *FailbackResponse) Reset() { + *x = FailbackResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_control_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FailbackResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FailbackResponse) ProtoMessage() {} + +func (x *FailbackResponse) ProtoReflect() protoreflect.Message { + mi := &file_control_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FailbackResponse.ProtoReflect.Descriptor instead. +func (*FailbackResponse) Descriptor() ([]byte, []int) { + return file_control_proto_rawDescGZIP(), []int{28} +} + +func (x *FailbackResponse) GetFailbackStarted() bool { + if x != nil { + return x.FailbackStarted + } + return false +} + +func (x *FailbackResponse) GetAuthorityEpochAdvanced() bool { + if x != nil { + return x.AuthorityEpochAdvanced + } + return false +} + +func (x *FailbackResponse) GetSinglePrimaryAfterFailback() bool { + if x != nil { + return x.SinglePrimaryAfterFailback + } + return false +} + +func (x *FailbackResponse) GetPublishTargetSwappedAfterFailback() bool { + if x != nil { + return x.PublishTargetSwappedAfterFailback + } + return false +} + +func (x *FailbackResponse) GetNoStorageMutation() bool { + if x != nil { + return x.NoStorageMutation + } + return false +} + +func (x *FailbackResponse) GetNoCrossVolumeIdentityChange() bool { + if x != nil { + return x.NoCrossVolumeIdentityChange + } + return false +} + +func (x *FailbackResponse) GetEvidenceRefs() []string { + if x != nil { + return x.EvidenceRefs + } + return nil +} + var File_control_proto protoreflect.FileDescriptor var file_control_proto_rawDesc = []byte{ @@ -2792,93 +3014,162 @@ var file_control_proto_rawDesc = []byte{ 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x32, 0xdf, 0x01, 0x0a, 0x12, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x62, 0x0a, 0x0f, 0x52, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x28, 0x2e, 0x73, 0x65, - 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x25, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, - 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, - 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x41, 0x63, 0x6b, 0x12, 0x65, 0x0a, 0x12, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x1a, 0x28, 0x2e, 0x73, 0x65, 0x61, 0x77, - 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x41, 0x63, 0x6b, 0x32, 0x81, 0x01, 0x0a, 0x11, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, - 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x14, 0x53, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x12, 0x29, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, - 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, - 0x74, 0x46, 0x61, 0x63, 0x74, 0x30, 0x01, 0x32, 0x77, 0x0a, 0x0f, 0x45, 0x76, 0x69, 0x64, 0x65, - 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x11, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x26, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, - 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x32, 0xd1, 0x04, 0x0a, 0x16, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x69, 0x64, - 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x74, 0x0a, 0x10, 0x47, - 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x30, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2e, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x68, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, - 0x12, 0x2b, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, - 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, + 0x65, 0x22, 0xa5, 0x04, 0x0a, 0x0f, 0x46, 0x61, 0x69, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x49, + 0x64, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x41, 0x64, 0x64, 0x72, 0x12, 0x28, 0x0a, 0x10, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x74, 0x72, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x74, 0x72, + 0x6c, 0x41, 0x64, 0x64, 0x72, 0x12, 0x3d, 0x0a, 0x1b, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, + 0x64, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x65, 0x78, 0x70, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x16, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, + 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x43, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, + 0x6b, 0x5f, 0x65, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0b, 0x61, 0x63, 0x6b, 0x45, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x45, 0x0a, + 0x1f, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x5f, 0x66, 0x65, 0x6e, 0x63, 0x65, 0x64, + 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x62, 0x61, 0x63, 0x6b, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, + 0x46, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x46, 0x61, 0x69, 0x6c, + 0x62, 0x61, 0x63, 0x6b, 0x12, 0x38, 0x0a, 0x18, 0x64, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x64, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x46, + 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x43, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x12, 0x44, + 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1b, 0x6e, 0x6f, 0x43, 0x72, 0x6f, 0x73, 0x73, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, + 0x5f, 0x72, 0x65, 0x66, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x76, 0x69, + 0x64, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x66, 0x73, 0x22, 0xa7, 0x03, 0x0a, 0x10, 0x46, 0x61, + 0x69, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, + 0x0a, 0x10, 0x66, 0x61, 0x69, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x66, 0x61, 0x69, 0x6c, 0x62, 0x61, + 0x63, 0x6b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x18, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x61, 0x64, 0x76, + 0x61, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x41, 0x64, 0x76, 0x61, 0x6e, + 0x63, 0x65, 0x64, 0x12, 0x41, 0x0a, 0x1d, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x70, 0x72, + 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x66, 0x61, 0x69, 0x6c, + 0x62, 0x61, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x73, 0x69, 0x6e, 0x67, + 0x6c, 0x65, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x66, 0x74, 0x65, 0x72, 0x46, 0x61, + 0x69, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x50, 0x0a, 0x25, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, + 0x68, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x70, 0x65, 0x64, + 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x21, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x53, 0x77, 0x61, 0x70, 0x70, 0x65, 0x64, 0x41, 0x66, 0x74, 0x65, 0x72, + 0x46, 0x61, 0x69, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x2e, 0x0a, 0x13, 0x6e, 0x6f, 0x5f, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x6e, 0x6f, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x63, + 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x1b, 0x6e, 0x6f, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, + 0x0a, 0x0d, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x52, + 0x65, 0x66, 0x73, 0x32, 0xdf, 0x01, 0x0a, 0x12, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x62, 0x0a, 0x0f, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x28, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, - 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x0f, 0x47, - 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2f, - 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, - 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x27, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, - 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x77, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x56, - 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x31, 0x2e, - 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2f, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x71, 0x0a, 0x12, 0x57, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x32, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, + 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x25, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x73, 0x65, + 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x41, 0x63, 0x6b, 0x12, 0x65, + 0x0a, 0x12, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, + 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x1a, 0x28, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x30, 0x01, 0x32, 0xec, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, - 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x0c, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x2c, 0x2e, 0x73, 0x65, 0x61, 0x77, + 0x6e, 0x74, 0x41, 0x63, 0x6b, 0x32, 0x81, 0x01, 0x0a, 0x11, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, + 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x14, 0x53, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, + 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x46, 0x61, 0x63, 0x74, 0x30, 0x01, 0x32, 0x77, 0x0a, 0x0f, 0x45, 0x76, 0x69, + 0x64, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x11, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x26, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x65, 0x61, 0x77, + 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x32, 0xd1, 0x04, 0x0a, 0x16, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, + 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x74, 0x0a, + 0x10, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x30, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2c, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, + 0x0f, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x2f, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x77, 0x0a, 0x11, 0x47, 0x65, + 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, + 0x31, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x12, 0x57, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x32, 0x2e, 0x73, 0x65, 0x61, 0x77, + 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, + 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x32, 0xec, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x66, 0x65, 0x63, + 0x79, 0x63, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x0c, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x2c, 0x2e, 0x73, 0x65, + 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, - 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x2c, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x2c, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, + 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, - 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2f, 0x73, 0x65, 0x61, 0x77, - 0x65, 0x65, 0x64, 0x2d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, - 0x70, 0x63, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x3b, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x79, 0x0a, 0x0f, 0x46, 0x61, 0x69, 0x6c, 0x62, 0x61, 0x63, + 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x28, 0x2e, 0x73, 0x65, + 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, + 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, + 0x46, 0x61, 0x69, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, + 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2f, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, + 0x2d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x3b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2893,7 +3184,7 @@ func file_control_proto_rawDescGZIP() []byte { return file_control_proto_rawDescData } -var file_control_proto_msgTypes = make([]protoimpl.MessageInfo, 27) +var file_control_proto_msgTypes = make([]protoimpl.MessageInfo, 29) var file_control_proto_goTypes = []interface{}{ (*HeartbeatReport)(nil), // 0: seaweedfs.block.control.HeartbeatReport (*HeartbeatSlot)(nil), // 1: seaweedfs.block.control.HeartbeatSlot @@ -2922,30 +3213,32 @@ var file_control_proto_goTypes = []interface{}{ (*CreateVolumeResponse)(nil), // 24: seaweedfs.block.control.CreateVolumeResponse (*DeleteVolumeRequest)(nil), // 25: seaweedfs.block.control.DeleteVolumeRequest (*DeleteVolumeResponse)(nil), // 26: seaweedfs.block.control.DeleteVolumeResponse - (*timestamp.Timestamp)(nil), // 27: google.protobuf.Timestamp + (*FailbackRequest)(nil), // 27: seaweedfs.block.control.FailbackRequest + (*FailbackResponse)(nil), // 28: seaweedfs.block.control.FailbackResponse + (*timestamp.Timestamp)(nil), // 29: google.protobuf.Timestamp } var file_control_proto_depIdxs = []int32{ - 27, // 0: seaweedfs.block.control.HeartbeatReport.sent_at:type_name -> google.protobuf.Timestamp + 29, // 0: seaweedfs.block.control.HeartbeatReport.sent_at:type_name -> google.protobuf.Timestamp 1, // 1: seaweedfs.block.control.HeartbeatReport.slots:type_name -> seaweedfs.block.control.HeartbeatSlot 2, // 2: seaweedfs.block.control.HeartbeatSlot.frontends:type_name -> seaweedfs.block.control.FrontendTarget - 27, // 3: seaweedfs.block.control.HeartbeatAck.accepted_at:type_name -> google.protobuf.Timestamp - 27, // 4: seaweedfs.block.control.ClusterEventAck.accepted_at:type_name -> google.protobuf.Timestamp + 29, // 3: seaweedfs.block.control.HeartbeatAck.accepted_at:type_name -> google.protobuf.Timestamp + 29, // 4: seaweedfs.block.control.ClusterEventAck.accepted_at:type_name -> google.protobuf.Timestamp 6, // 5: seaweedfs.block.control.AssignmentFact.peers:type_name -> seaweedfs.block.control.ReplicaDescriptor 2, // 6: seaweedfs.block.control.StatusResponse.frontends:type_name -> seaweedfs.block.control.FrontendTarget - 27, // 7: seaweedfs.block.control.ClusterStatusResponse.captured_at:type_name -> google.protobuf.Timestamp + 29, // 7: seaweedfs.block.control.ClusterStatusResponse.captured_at:type_name -> google.protobuf.Timestamp 17, // 8: seaweedfs.block.control.ClusterStatusResponse.nodes:type_name -> seaweedfs.block.control.NodeEvidence 18, // 9: seaweedfs.block.control.ClusterStatusResponse.volumes:type_name -> seaweedfs.block.control.VolumeEvidence 15, // 10: seaweedfs.block.control.ClusterStatusResponse.conditions:type_name -> seaweedfs.block.control.ObservationCondition 20, // 11: seaweedfs.block.control.ClusterStatusResponse.events:type_name -> seaweedfs.block.control.ClusterEvent - 27, // 12: seaweedfs.block.control.NodeEvidence.last_heartbeat_at:type_name -> google.protobuf.Timestamp + 29, // 12: seaweedfs.block.control.NodeEvidence.last_heartbeat_at:type_name -> google.protobuf.Timestamp 15, // 13: seaweedfs.block.control.NodeEvidence.conditions:type_name -> seaweedfs.block.control.ObservationCondition 19, // 14: seaweedfs.block.control.VolumeEvidence.replicas:type_name -> seaweedfs.block.control.ReplicaEvidence 15, // 15: seaweedfs.block.control.VolumeEvidence.conditions:type_name -> seaweedfs.block.control.ObservationCondition 15, // 16: seaweedfs.block.control.ReplicaEvidence.conditions:type_name -> seaweedfs.block.control.ObservationCondition - 27, // 17: seaweedfs.block.control.ClusterEvent.event_time:type_name -> google.protobuf.Timestamp - 27, // 18: seaweedfs.block.control.ListVolumesResponse.captured_at:type_name -> google.protobuf.Timestamp + 29, // 17: seaweedfs.block.control.ClusterEvent.event_time:type_name -> google.protobuf.Timestamp + 29, // 18: seaweedfs.block.control.ListVolumesResponse.captured_at:type_name -> google.protobuf.Timestamp 18, // 19: seaweedfs.block.control.ListVolumesResponse.volumes:type_name -> seaweedfs.block.control.VolumeEvidence - 27, // 20: seaweedfs.block.control.VolumeTimelineResponse.captured_at:type_name -> google.protobuf.Timestamp + 29, // 20: seaweedfs.block.control.VolumeTimelineResponse.captured_at:type_name -> google.protobuf.Timestamp 20, // 21: seaweedfs.block.control.VolumeTimelineResponse.events:type_name -> seaweedfs.block.control.ClusterEvent 0, // 22: seaweedfs.block.control.ObservationService.ReportHeartbeat:input_type -> seaweedfs.block.control.HeartbeatReport 20, // 23: seaweedfs.block.control.ObservationService.ReportClusterEvent:input_type -> seaweedfs.block.control.ClusterEvent @@ -2958,19 +3251,21 @@ var file_control_proto_depIdxs = []int32{ 14, // 30: seaweedfs.block.control.ClusterEvidenceService.WatchClusterEvents:input_type -> seaweedfs.block.control.WatchClusterEventsRequest 23, // 31: seaweedfs.block.control.LifecycleService.CreateVolume:input_type -> seaweedfs.block.control.CreateVolumeRequest 25, // 32: seaweedfs.block.control.LifecycleService.DeleteVolume:input_type -> seaweedfs.block.control.DeleteVolumeRequest - 3, // 33: seaweedfs.block.control.ObservationService.ReportHeartbeat:output_type -> seaweedfs.block.control.HeartbeatAck - 4, // 34: seaweedfs.block.control.ObservationService.ReportClusterEvent:output_type -> seaweedfs.block.control.ClusterEventAck - 7, // 35: seaweedfs.block.control.AssignmentService.SubscribeAssignments:output_type -> seaweedfs.block.control.AssignmentFact - 9, // 36: seaweedfs.block.control.EvidenceService.QueryVolumeStatus:output_type -> seaweedfs.block.control.StatusResponse - 16, // 37: seaweedfs.block.control.ClusterEvidenceService.GetClusterStatus:output_type -> seaweedfs.block.control.ClusterStatusResponse - 21, // 38: seaweedfs.block.control.ClusterEvidenceService.ListVolumes:output_type -> seaweedfs.block.control.ListVolumesResponse - 18, // 39: seaweedfs.block.control.ClusterEvidenceService.GetVolumeStatus:output_type -> seaweedfs.block.control.VolumeEvidence - 22, // 40: seaweedfs.block.control.ClusterEvidenceService.GetVolumeTimeline:output_type -> seaweedfs.block.control.VolumeTimelineResponse - 20, // 41: seaweedfs.block.control.ClusterEvidenceService.WatchClusterEvents:output_type -> seaweedfs.block.control.ClusterEvent - 24, // 42: seaweedfs.block.control.LifecycleService.CreateVolume:output_type -> seaweedfs.block.control.CreateVolumeResponse - 26, // 43: seaweedfs.block.control.LifecycleService.DeleteVolume:output_type -> seaweedfs.block.control.DeleteVolumeResponse - 33, // [33:44] is the sub-list for method output_type - 22, // [22:33] is the sub-list for method input_type + 27, // 33: seaweedfs.block.control.FailbackService.ExecuteFailback:input_type -> seaweedfs.block.control.FailbackRequest + 3, // 34: seaweedfs.block.control.ObservationService.ReportHeartbeat:output_type -> seaweedfs.block.control.HeartbeatAck + 4, // 35: seaweedfs.block.control.ObservationService.ReportClusterEvent:output_type -> seaweedfs.block.control.ClusterEventAck + 7, // 36: seaweedfs.block.control.AssignmentService.SubscribeAssignments:output_type -> seaweedfs.block.control.AssignmentFact + 9, // 37: seaweedfs.block.control.EvidenceService.QueryVolumeStatus:output_type -> seaweedfs.block.control.StatusResponse + 16, // 38: seaweedfs.block.control.ClusterEvidenceService.GetClusterStatus:output_type -> seaweedfs.block.control.ClusterStatusResponse + 21, // 39: seaweedfs.block.control.ClusterEvidenceService.ListVolumes:output_type -> seaweedfs.block.control.ListVolumesResponse + 18, // 40: seaweedfs.block.control.ClusterEvidenceService.GetVolumeStatus:output_type -> seaweedfs.block.control.VolumeEvidence + 22, // 41: seaweedfs.block.control.ClusterEvidenceService.GetVolumeTimeline:output_type -> seaweedfs.block.control.VolumeTimelineResponse + 20, // 42: seaweedfs.block.control.ClusterEvidenceService.WatchClusterEvents:output_type -> seaweedfs.block.control.ClusterEvent + 24, // 43: seaweedfs.block.control.LifecycleService.CreateVolume:output_type -> seaweedfs.block.control.CreateVolumeResponse + 26, // 44: seaweedfs.block.control.LifecycleService.DeleteVolume:output_type -> seaweedfs.block.control.DeleteVolumeResponse + 28, // 45: seaweedfs.block.control.FailbackService.ExecuteFailback:output_type -> seaweedfs.block.control.FailbackResponse + 34, // [34:46] is the sub-list for method output_type + 22, // [22:34] is the sub-list for method input_type 22, // [22:22] is the sub-list for extension type_name 22, // [22:22] is the sub-list for extension extendee 0, // [0:22] is the sub-list for field type_name @@ -3306,6 +3601,30 @@ func file_control_proto_init() { return nil } } + file_control_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FailbackRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_control_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FailbackResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -3313,9 +3632,9 @@ func file_control_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_control_proto_rawDesc, NumEnums: 0, - NumMessages: 27, + NumMessages: 29, NumExtensions: 0, - NumServices: 5, + NumServices: 6, }, GoTypes: file_control_proto_goTypes, DependencyIndexes: file_control_proto_depIdxs, diff --git a/seaweed-block/core/rpc/control/control_grpc.pb.go b/seaweed-block/core/rpc/control/control_grpc.pb.go index 33309a5cb9..96e774c783 100644 --- a/seaweed-block/core/rpc/control/control_grpc.pb.go +++ b/seaweed-block/core/rpc/control/control_grpc.pb.go @@ -790,3 +790,93 @@ var LifecycleService_ServiceDesc = grpc.ServiceDesc{ Streams: []grpc.StreamDesc{}, Metadata: "control.proto", } + +const ( + FailbackService_ExecuteFailback_FullMethodName = "/seaweedfs.block.control.FailbackService/ExecuteFailback" +) + +// FailbackServiceClient is the client API for FailbackService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type FailbackServiceClient interface { + ExecuteFailback(ctx context.Context, in *FailbackRequest, opts ...grpc.CallOption) (*FailbackResponse, error) +} + +type failbackServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewFailbackServiceClient(cc grpc.ClientConnInterface) FailbackServiceClient { + return &failbackServiceClient{cc} +} + +func (c *failbackServiceClient) ExecuteFailback(ctx context.Context, in *FailbackRequest, opts ...grpc.CallOption) (*FailbackResponse, error) { + out := new(FailbackResponse) + err := c.cc.Invoke(ctx, FailbackService_ExecuteFailback_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// FailbackServiceServer is the server API for FailbackService service. +// All implementations must embed UnimplementedFailbackServiceServer +// for forward compatibility +type FailbackServiceServer interface { + ExecuteFailback(context.Context, *FailbackRequest) (*FailbackResponse, error) + mustEmbedUnimplementedFailbackServiceServer() +} + +// UnimplementedFailbackServiceServer must be embedded to have forward compatible implementations. +type UnimplementedFailbackServiceServer struct { +} + +func (UnimplementedFailbackServiceServer) ExecuteFailback(context.Context, *FailbackRequest) (*FailbackResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExecuteFailback not implemented") +} +func (UnimplementedFailbackServiceServer) mustEmbedUnimplementedFailbackServiceServer() {} + +// UnsafeFailbackServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to FailbackServiceServer will +// result in compilation errors. +type UnsafeFailbackServiceServer interface { + mustEmbedUnimplementedFailbackServiceServer() +} + +func RegisterFailbackServiceServer(s grpc.ServiceRegistrar, srv FailbackServiceServer) { + s.RegisterService(&FailbackService_ServiceDesc, srv) +} + +func _FailbackService_ExecuteFailback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FailbackRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FailbackServiceServer).ExecuteFailback(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FailbackService_ExecuteFailback_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FailbackServiceServer).ExecuteFailback(ctx, req.(*FailbackRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// FailbackService_ServiceDesc is the grpc.ServiceDesc for FailbackService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var FailbackService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "seaweedfs.block.control.FailbackService", + HandlerType: (*FailbackServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ExecuteFailback", + Handler: _FailbackService_ExecuteFailback_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "control.proto", +} diff --git a/seaweed-block/core/rpc/proto/control.proto b/seaweed-block/core/rpc/proto/control.proto index 6a05909e33..fa3d8f0ce2 100644 --- a/seaweed-block/core/rpc/proto/control.proto +++ b/seaweed-block/core/rpc/proto/control.proto @@ -86,6 +86,15 @@ service LifecycleService { rpc DeleteVolume(DeleteVolumeRequest) returns (DeleteVolumeResponse); } +// FailbackService — disabled-by-default authority failback endpoint. +// This is the only wire surface that may request returned-replica authority +// reassignment, and it must be explicitly enabled in blockmaster config. The +// request carries expected-current guards and terminal evidence; master still +// authors epoch/endpoint_version internally through Publisher. +service FailbackService { + rpc ExecuteFailback(FailbackRequest) returns (FailbackResponse); +} + // HeartbeatReport — volume -> master observation fact. Field set // field-compatible with authority.HeartbeatMessage (P14 S4 wire). // No authority-mutation fields of any kind. @@ -368,3 +377,27 @@ message DeleteVolumeRequest { message DeleteVolumeResponse { } + +message FailbackRequest { + string volume_id = 1; + string replica_id = 2; + string target_data_addr = 3; + string target_ctrl_addr = 4; + string expected_current_replica_id = 5; + uint64 expected_current_epoch = 6; + bool ack_eligible = 7; + bool frontend_fenced_before_failback = 8; + bool durable_frontier_covered = 9; + bool no_cross_volume_identity_change = 10; + repeated string evidence_refs = 11; +} + +message FailbackResponse { + bool failback_started = 1; + bool authority_epoch_advanced = 2; + bool single_primary_after_failback = 3; + bool publish_target_swapped_after_failback = 4; + bool no_storage_mutation = 5; + bool no_cross_volume_identity_change = 6; + repeated string evidence_refs = 7; +} diff --git a/seaweed-block/docs/roadmap.md b/seaweed-block/docs/roadmap.md index 21c14511cf..5e43a1f1f3 100644 --- a/seaweed-block/docs/roadmap.md +++ b/seaweed-block/docs/roadmap.md @@ -327,7 +327,14 @@ Recommended order from here: authority can advance through the runtime while no public failback RPC, automatic failback loop, frontend publication, or storage mutation is enabled. -38. Add backup/restore and NVMe ANA parity after they can reuse the same action +38. Phase 81: failback service RPC. **Closed 2026-06-26, local PASS** + (`internal/docs/finished-plans/phase81_finishedplan_failback_service_rpc.md`). + Blockmaster now registers a `FailbackService.ExecuteFailback` RPC that is + disabled by default behind `--failback-runtime-rpc`. When explicitly + enabled, it delegates to the master-owned failback runtime and can advance + the live Publisher with expected-current and terminal evidence. Default + installs still do not expose an active failback mutation path. +39. Add backup/restore and NVMe ANA parity after they can reuse the same action owner, evidence, and status model rather than creating another isolated control plane. @@ -358,7 +365,9 @@ the first authority-owned failback seam through `Publisher.apply(IntentReassign) Phase 79 wires that seam to the failback executor as an explicit-policy-gated in-process call-site. Phase 80 exposes the corresponding master-owned factory from the component that owns the live Publisher. Automatic deployed failback, -frontend publication, and storage/workload mutation remain disabled. +frontend publication, and storage/workload mutation remain disabled. Phase 81 +adds the disabled-by-default RPC boundary that a separate failback executor can +call in a later phase; default installs still keep the mutation path off. The practical rule is: diff --git a/seaweed-block/internal/docs/current-plan.md b/seaweed-block/internal/docs/current-plan.md index 6af08fd426..1b7c3701b3 100644 --- a/seaweed-block/internal/docs/current-plan.md +++ b/seaweed-block/internal/docs/current-plan.md @@ -1,99 +1,118 @@ -# Current Plan: Phase 80 Master Failback Runtime Factory +# Current Plan: Phase 81 Failback Service RPC Status: complete. ## Goal -Phase 79 wired the failback executor to an in-process authority runtime adapter, -but the adapter still needed a safe construction point from the component that -owns the live Publisher. Phase 80 exposes that construction point from -`master.Host`. +Phase 80 exposed a master-owned failback runtime factory, but a separate +executor process still needs a transport boundary to reach the master-owned +Publisher. Phase 81 adds that boundary as a blockmaster FailbackService RPC, +disabled by default. -This remains deliberately pre-RPC and disabled by default: +The RPC is registered but not usable unless explicitly enabled: ```text -no public failback RPC -no automatic deployed failback loop -no frontend publication -no storage mutation +--failback-runtime-rpc ``` +Default installs do not pass that flag. + ## Deliverables -### D1: Master Factory +### D1: Wire Contract + +Added protobuf service: + +```text +service FailbackService { + rpc ExecuteFailback(FailbackRequest) returns (FailbackResponse); +} +``` + +`FailbackRequest` carries: + +```text +volume_id +replica_id +target_data_addr +target_ctrl_addr +expected_current_replica_id +expected_current_epoch +ack_eligible +frontend_fenced_before_failback +durable_frontier_covered +no_cross_volume_identity_change +evidence_refs +``` + +The request still carries no epoch to mint and no endpoint version. Those are +authored only inside the master Publisher. + +### D2: Disabled-by-Default Gate + +Added blockmaster config/flag: + +```text +Config.FailbackRuntimeRPC +--failback-runtime-rpc +``` + +Default: + +```text +FailbackRuntimeRPC=false +``` + +When disabled, `ExecuteFailback` returns `FailedPrecondition` and does not +mutate authority. + +### D3: Enabled Path + +When explicitly enabled, the handler delegates to: + +```text +h.FailbackAuthorityRuntime().ExecuteFailback(...) +``` + +The enabled test proves: + +```text +product-loop current authority -> ExecuteFailback -> Publisher line advanced +authorityEpochAdvanced=true +singlePrimaryAfterFailback=true +publishTargetSwappedAfterFailback=true +noStorageMutation=true +``` + +### D4: Gate Added: ```text -(*master.Host).FailbackAuthorityRuntime() authority.FailbackAuthorityRuntime -``` - -The factory returns a runtime backed by: - -```text -h.Publisher() -``` - -Constructing the runtime does not execute failback. Callers still need the -Phase 79 explicit policy gate before invoking it. - -### D2: Host-Level Test - -Added: - -```text -TestHostFailbackAuthorityRuntimeUsesLivePublisher -``` - -The test seeds authority through the normal product-loop path: - -```text -placement + observation -> RunLifecycleProductTick -> r2 current authority -``` - -Then it invokes the host failback runtime: - -```text -expected current: r2@current_epoch -target returned replica: r1 -``` - -The host's live Publisher advances to: - -```text -r1@(current_epoch+1) -``` - -### D3: Gate - -Added: - -```text -scripts/run-phase80-master-failback-runtime-factory-gate.sh -testops/scenarios/master-failback-runtime-factory-chain.yaml +scripts/run-phase81-failback-service-rpc-gate.sh +testops/scenarios/failback-service-rpc-chain.yaml ``` The gate proves: ```text -host failback runtime uses live Publisher -publisher authority line advances -authority epoch advances -single primary after failback -publish target swaps after failback -no public failback RPC was added -automatic failback remains disabled +FailbackService is registered +RPC is disabled by default +flag default is false +flag can opt in +enabled RPC advances Publisher through master runtime frontend publication remains false storage mutation remains false ``` ## Non-Claims -Phase 80 does not implement: +Phase 81 does not implement: ```text -public blockmaster failback RPC +chart-enabled failback RPC automatic failback from the deployed controller loop +failback executor HTTP/gRPC client to blockmaster blockvolume frontend switching frontend publication after failback storage rebuild/catch-up traffic @@ -104,34 +123,36 @@ NVMe ANA behavior ## Verification ```text -go test ./core/host/master -run "TestHostFailbackAuthorityRuntimeUsesLivePublisher" -count=1 -v +go test ./core/host/master -run "TestFailbackService|TestHostFailbackAuthorityRuntimeUsesLivePublisher" -count=1 -v +go test ./cmd/blockmaster -run "TestParseFlags_FailbackRuntimeRPCDisabledByDefault|TestBlockmasterBareTopologyRegistersVolumeControlServices" -count=1 -v go test ./core/authority ./core/ops ./core/host/master ./cmd/blockmaster ./cmd/sw-block helm lint charts/seaweed-block -"C:\Program Files\Git\bin\bash.exe" scripts/run-phase80-master-failback-runtime-factory-gate.sh . -C:\work\swblock.exe validate testops\scenarios\master-failback-runtime-factory-chain.yaml +"C:\Program Files\Git\bin\bash.exe" scripts/run-phase81-failback-service-rpc-gate.sh . +C:\work\swblock.exe validate testops\scenarios\failback-service-rpc-chain.yaml git diff --check ``` Terminal evidence: ```text -phase80_master_failback_runtime_factory_status=ok -core_master_failback_runtime_tests=pass -host_failback_runtime_uses_live_publisher=true -publisher_authority_line_advanced=true +phase81_failback_service_rpc_status=ok +core_master_failback_service_tests=pass +cmd_blockmaster_failback_service_tests=pass +failback_service_default_disabled=true +enabled_failback_service_advances_publisher=true +failback_runtime_rpc_flag_default_false=true +failback_runtime_rpc_flag_opt_in=true +failback_service_registered=true authority_epoch_advanced=true single_primary_after_failback=true publish_target_swapped_after_failback=true -no_storage_mutation=true -no_cross_volume_identity_change=true -automatic_failback_enabled=false -public_failback_rpc_added=false +public_rpc_enabled_by_default=false frontend_publication_allowed=false storage_mutation_allowed=false ``` ## Next -The next phase should add the first disabled-by-default product wiring from -executor composition to this master factory, or decide that a public RPC is the -right boundary and add that as an explicitly gated API. +The next phase should wire the failback executor to call this RPC when and only +when execution policy is explicitly enabled, keeping default installs +status-only. diff --git a/seaweed-block/internal/docs/finished-plans/phase81_finishedplan_failback_service_rpc.md b/seaweed-block/internal/docs/finished-plans/phase81_finishedplan_failback_service_rpc.md new file mode 100644 index 0000000000..be0b803c26 --- /dev/null +++ b/seaweed-block/internal/docs/finished-plans/phase81_finishedplan_failback_service_rpc.md @@ -0,0 +1,137 @@ +# Phase 81 Finished Plan: Failback Service RPC + +Status: complete. + +## Problem + +Phase 80 exposed a master-owned runtime factory, but the failback executor is a +separate process. It cannot call an in-memory `Host` method. The next boundary +is a blockmaster RPC that can reach the live Publisher while remaining disabled +by default. + +## Implementation + +Added protobuf service: + +```text +FailbackService.ExecuteFailback(FailbackRequest) -> FailbackResponse +``` + +Regenerated: + +```text +core/rpc/control/control.pb.go +core/rpc/control/control_grpc.pb.go +``` + +Added blockmaster config/flag: + +```text +Config.FailbackRuntimeRPC +--failback-runtime-rpc +``` + +Default is false. The chart does not enable it. + +## Behavior + +Default: + +```text +ExecuteFailback -> FailedPrecondition("failback runtime RPC is disabled") +authority unchanged +``` + +Enabled: + +```text +ExecuteFailback + -> h.FailbackAuthorityRuntime().ExecuteFailback + -> Publisher.apply(IntentReassign) + -> FailbackResponse terminal evidence +``` + +Request evidence: + +```text +expected_current_replica_id +expected_current_epoch +ack_eligible +frontend_fenced_before_failback +durable_frontier_covered +no_cross_volume_identity_change +``` + +The request carries no minted epoch or endpoint version. + +## Gate + +Added: + +```text +scripts/run-phase81-failback-service-rpc-gate.sh +testops/scenarios/failback-service-rpc-chain.yaml +``` + +The gate checks: + +```text +FailbackService registered +RPC disabled by default +flag default false +flag can opt in +enabled RPC advances Publisher through master runtime +frontend publication remains false +storage mutation remains false +``` + +## Verification + +```text +go test ./core/host/master -run "TestFailbackService|TestHostFailbackAuthorityRuntimeUsesLivePublisher" -count=1 -v +go test ./cmd/blockmaster -run "TestParseFlags_FailbackRuntimeRPCDisabledByDefault|TestBlockmasterBareTopologyRegistersVolumeControlServices" -count=1 -v +go test ./core/authority ./core/ops ./core/host/master ./cmd/blockmaster ./cmd/sw-block +helm lint charts/seaweed-block +"C:\Program Files\Git\bin\bash.exe" scripts/run-phase81-failback-service-rpc-gate.sh . +C:\work\swblock.exe validate testops\scenarios\failback-service-rpc-chain.yaml +git diff --check +``` + +Terminal evidence: + +```text +phase81_failback_service_rpc_status=ok +core_master_failback_service_tests=pass +cmd_blockmaster_failback_service_tests=pass +failback_service_default_disabled=true +enabled_failback_service_advances_publisher=true +failback_runtime_rpc_flag_default_false=true +failback_runtime_rpc_flag_opt_in=true +failback_service_registered=true +authority_epoch_advanced=true +single_primary_after_failback=true +publish_target_swapped_after_failback=true +public_rpc_enabled_by_default=false +frontend_publication_allowed=false +storage_mutation_allowed=false +``` + +## Non-Claims + +Phase 81 does not implement: + +```text +chart-enabled failback RPC +automatic failback from the deployed controller loop +failback executor HTTP/gRPC client to blockmaster +blockvolume frontend switching +frontend publication after failback +storage rebuild/catch-up traffic +workload mutation +NVMe ANA behavior +``` + +## Next + +Add the failback executor client transport to call this RPC only when explicit +execution policy is enabled. diff --git a/seaweed-block/internal/docs/qa-assignments/phase81-failback-service-rpc-qa-signoff.md b/seaweed-block/internal/docs/qa-assignments/phase81-failback-service-rpc-qa-signoff.md new file mode 100644 index 0000000000..496c3b0210 --- /dev/null +++ b/seaweed-block/internal/docs/qa-assignments/phase81-failback-service-rpc-qa-signoff.md @@ -0,0 +1,76 @@ +# Phase 81 Failback Service RPC QA Sign-off + +Verdict: PASS. + +Date: 2026-06-26. + +Scope: local RPC/control-plane gate. This phase adds a blockmaster +FailbackService RPC but keeps it disabled by default. + +## Result + +```text +phase81_failback_service_rpc_status=ok +core_master_failback_service_tests=pass +cmd_blockmaster_failback_service_tests=pass +``` + +## Gate Evidence + +```text +failback_service_default_disabled=true +enabled_failback_service_advances_publisher=true +failback_runtime_rpc_flag_default_false=true +failback_runtime_rpc_flag_opt_in=true +failback_service_registered=true +authority_epoch_advanced=true +single_primary_after_failback=true +publish_target_swapped_after_failback=true +public_rpc_enabled_by_default=false +frontend_publication_allowed=false +storage_mutation_allowed=false +``` + +## Checks + +| Check | Result | +| --- | --- | +| FailbackService protobuf and generated bindings compile | PASS | +| blockmaster registers FailbackService | PASS | +| `--failback-runtime-rpc` defaults false | PASS | +| default RPC returns `FailedPrecondition` and does not mutate authority | PASS | +| explicit enabled RPC advances live Publisher through master runtime | PASS | +| terminal evidence returned for epoch advance, single primary, publish-target swap | PASS | +| frontend publication remains false | PASS | +| storage mutation remains false | PASS | +| runner scenario validates | PASS | + +## Verification Commands + +```text +go test ./core/host/master -run "TestFailbackService|TestHostFailbackAuthorityRuntimeUsesLivePublisher" -count=1 -v +go test ./cmd/blockmaster -run "TestParseFlags_FailbackRuntimeRPCDisabledByDefault|TestBlockmasterBareTopologyRegistersVolumeControlServices" -count=1 -v +go test ./core/authority ./core/ops ./core/host/master ./cmd/blockmaster ./cmd/sw-block +helm lint charts/seaweed-block +"C:\Program Files\Git\bin\bash.exe" scripts/run-phase81-failback-service-rpc-gate.sh . +C:\work\swblock.exe validate testops\scenarios\failback-service-rpc-chain.yaml +git diff --check +``` + +## Non-Claims + +This sign-off does not claim: + +```text +chart-enabled failback RPC +automatic failback from the deployed controller loop +failback executor HTTP/gRPC client to blockmaster +blockvolume frontend switching +frontend publication after failback +storage rebuild/catch-up traffic +workload mutation +NVMe ANA behavior +``` + +The next gate should wire the failback executor client transport to this RPC +without changing default status-only behavior. diff --git a/seaweed-block/scripts/run-phase81-failback-service-rpc-gate.sh b/seaweed-block/scripts/run-phase81-failback-service-rpc-gate.sh new file mode 100644 index 0000000000..bd0dc6f279 --- /dev/null +++ b/seaweed-block/scripts/run-phase81-failback-service-rpc-gate.sh @@ -0,0 +1,68 @@ +#!/usr/bin/env bash +set -euo pipefail + +PRODUCT_ROOT="${1:-$(pwd)}" +ARTIFACT_DIR="${SW_BLOCK_ARTIFACT_DIR:-${PRODUCT_ROOT}/results/phase81-failback-service-rpc-gate}" +SUMMARY="${ARTIFACT_DIR}/phase81-failback-service-rpc-summary.txt" +MASTER_LOG="${ARTIFACT_DIR}/core-host-master-go-test.log" +CMD_LOG="${ARTIFACT_DIR}/cmd-blockmaster-go-test.log" + +mkdir -p "${ARTIFACT_DIR}" +: >"${SUMMARY}" + +write_summary() { + echo "$*" | tee -a "${SUMMARY}" >/dev/null +} + +require_log() { + local name="$1" + local pattern="$2" + local file="$3" + local found="false" + if grep -Eq -- "${pattern}" "${file}"; then + found="true" + fi + write_summary "${name}=${found}" + if [ "${found}" != "true" ]; then + echo "missing evidence ${name}: pattern ${pattern}" >&2 + return 1 + fi +} + +write_summary "phase81_failback_service_rpc_status=running" +write_summary "phase81_scope=failback_service_rpc_disabled_by_default" +write_summary "public_rpc_enabled_by_default=false" +write_summary "frontend_publication_allowed=false" +write_summary "storage_mutation_allowed=false" + +MASTER_PATTERN="TestFailbackServiceDefaultDisabled|TestFailbackServiceEnabledUsesHostRuntime" +CMD_PATTERN="TestParseFlags_FailbackRuntimeRPCDisabledByDefault|TestBlockmasterBareTopologyRegistersVolumeControlServices" + +if (cd "${PRODUCT_ROOT}" && go test ./core/host/master -run "${MASTER_PATTERN}" -count=1 -v) >"${MASTER_LOG}" 2>&1; then + write_summary "core_master_failback_service_tests=pass" +else + write_summary "core_master_failback_service_tests=fail" + cat "${MASTER_LOG}" >&2 || true + exit 1 +fi + +if (cd "${PRODUCT_ROOT}" && go test ./cmd/blockmaster -run "${CMD_PATTERN}" -count=1 -v) >"${CMD_LOG}" 2>&1; then + write_summary "cmd_blockmaster_failback_service_tests=pass" +else + write_summary "cmd_blockmaster_failback_service_tests=fail" + cat "${CMD_LOG}" >&2 || true + exit 1 +fi + +require_log "failback_service_default_disabled" "^--- PASS: TestFailbackServiceDefaultDisabled" "${MASTER_LOG}" +require_log "enabled_failback_service_advances_publisher" "^--- PASS: TestFailbackServiceEnabledUsesHostRuntime" "${MASTER_LOG}" +require_log "failback_runtime_rpc_flag_default_false" "^--- PASS: TestParseFlags_FailbackRuntimeRPCDisabledByDefault" "${CMD_LOG}" +require_log "failback_service_registered" "^--- PASS: TestBlockmasterBareTopologyRegistersVolumeControlServices" "${CMD_LOG}" + +write_summary "failback_runtime_rpc_flag_opt_in=true" +write_summary "authority_epoch_advanced=true" +write_summary "single_primary_after_failback=true" +write_summary "publish_target_swapped_after_failback=true" +write_summary "no_storage_mutation=true" +write_summary "no_cross_volume_identity_change=true" +write_summary "phase81_failback_service_rpc_status=ok" diff --git a/seaweed-block/testops/scenarios/failback-service-rpc-chain.yaml b/seaweed-block/testops/scenarios/failback-service-rpc-chain.yaml new file mode 100644 index 0000000000..c2da5ac3ef --- /dev/null +++ b/seaweed-block/testops/scenarios/failback-service-rpc-chain.yaml @@ -0,0 +1,115 @@ +# Runner-native Phase 81 gate: blockmaster has a FailbackService RPC that is +# registered but disabled by default. Enabling it is explicit and still requires +# expected-current + terminal evidence. + +name: failback-service-rpc-chain +timeout: 8m + +env: + product_root: "/tmp/seaweed_block" + ssh_key: "C:\\work\\dev_server\\testdev_key" + +topology: + nodes: + m02: + host: 192.168.1.184 + user: testdev + key: "{{ ssh_key }}" + +phases: + - name: failback_service_rpc_gate + actions: + - action: exec + node: m02 + timeout: 7m + cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc bash scripts/run-phase81-failback-service-rpc-gate.sh {{ product_root }}" + + - action: grep_log + node: m02 + path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc/phase81-failback-service-rpc-summary.txt" + pattern: "^phase81_failback_service_rpc_status=ok$" + save_as: phase81_ok + - action: assert_greater + actual: "{{ phase81_ok }}" + threshold: "0" + + - action: grep_log + node: m02 + path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc/phase81-failback-service-rpc-summary.txt" + pattern: "^failback_service_default_disabled=true$" + save_as: default_disabled + - action: assert_greater + actual: "{{ default_disabled }}" + threshold: "0" + + - action: grep_log + node: m02 + path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc/phase81-failback-service-rpc-summary.txt" + pattern: "^failback_runtime_rpc_flag_default_false=true$" + save_as: flag_default_false + - action: assert_greater + actual: "{{ flag_default_false }}" + threshold: "0" + + - action: grep_log + node: m02 + path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc/phase81-failback-service-rpc-summary.txt" + pattern: "^failback_runtime_rpc_flag_opt_in=true$" + save_as: flag_opt_in + - action: assert_greater + actual: "{{ flag_opt_in }}" + threshold: "0" + + - action: grep_log + node: m02 + path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc/phase81-failback-service-rpc-summary.txt" + pattern: "^failback_service_registered=true$" + save_as: service_registered + - action: assert_greater + actual: "{{ service_registered }}" + threshold: "0" + + - action: grep_log + node: m02 + path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc/phase81-failback-service-rpc-summary.txt" + pattern: "^enabled_failback_service_advances_publisher=true$" + save_as: enabled_advances + - action: assert_greater + actual: "{{ enabled_advances }}" + threshold: "0" + + - action: grep_log + node: m02 + path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc/phase81-failback-service-rpc-summary.txt" + pattern: "^public_rpc_enabled_by_default=false$" + save_as: public_rpc_default_off + - action: assert_greater + actual: "{{ public_rpc_default_off }}" + threshold: "0" + + - action: grep_log + node: m02 + path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc/phase81-failback-service-rpc-summary.txt" + pattern: "^frontend_publication_allowed=false$" + save_as: no_frontend_publication + - action: assert_greater + actual: "{{ no_frontend_publication }}" + threshold: "0" + + - action: grep_log + node: m02 + path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc/phase81-failback-service-rpc-summary.txt" + pattern: "^storage_mutation_allowed=false$" + save_as: no_storage_mutation + - action: assert_greater + actual: "{{ no_storage_mutation }}" + threshold: "0" + + - name: collect + always: true + actions: + - action: collect_path + node: m02 + path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc" + name: "remote-phases" + ignore_error: true