G15a: publish frontend target facts for CSI attach

This commit is contained in:
pingqiu committed 2026-05-03 08:01:37 -07:00
1 parent 5733cca270
commit 734b48bd5d
13 files changed
+919 -193

No files matched your search

@@ -36,6 +36,10 @@ import (
"syscall"
"testing"
"time"
control "github.com/seaweedfs/seaweed-block/core/rpc/control"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)
// l2bins holds the paths of compiled blockmaster + blockvolume.
@@ -343,6 +347,60 @@ func TestG54_BinaryWiring_RoleSplit_2NodeSmoke(t *testing.T) {
_ = conn.Close()
}
func TestG15a_BlockvolumeReportsFrontendTargetsToMasterStatus(t *testing.T) {
if testing.Short() {
t.Skip("L2 subprocess test; -short skip")
}
bins := buildG54Binaries(t)
art := t.TempDir()
_, masterAddr := startG54Master(t, bins, art)
primaryDataLn, primaryStatusLn := pickAddr(t), pickAddr(t)
replicaDataLn, replicaStatusLn := pickAddr(t), pickAddr(t)
primaryCtrl, replicaCtrl := pickAddr(t), pickAddr(t)
iscsiListen := pickAddr(t)
iqn := "iqn.2026-05.io.seaweedfs:g15a-v1"
_ = startG54Volume(t, bins, art, volOpts{
masterAddr: masterAddr,
serverID: "s1",
replicaID: "r1",
dataAddr: primaryDataLn,
ctrlAddr: primaryCtrl,
statusAddr: primaryStatusLn,
iscsiAddr: iscsiListen,
iscsiIQN: iqn,
durableRoot: filepath.Join(art, "primary-store"),
logTag: "primary-iscsi",
})
_ = startG54Volume(t, bins, art, volOpts{
masterAddr: masterAddr,
serverID: "s2",
replicaID: "r2",
dataAddr: replicaDataLn,
ctrlAddr: replicaCtrl,
statusAddr: replicaStatusLn,
durableRoot: filepath.Join(art, "replica-store"),
logTag: "replica",
})
resp := pollMasterStatus(t, masterAddr, "v1", 15*time.Second, func(resp *control.StatusResponse) bool {
if !resp.GetAssigned() || resp.GetReplicaId() != "r1" {
return false
}
for _, ft := range resp.GetFrontends() {
if ft.GetProtocol() == "iscsi" && ft.GetAddr() == iscsiListen && ft.GetIqn() == iqn {
return true
}
}
return false
})
if resp == nil {
t.Fatal("master status did not expose assigned replica's iSCSI frontend target")
}
}
// pickAddr binds a temporary listener to find a free port, then closes
// it. Caller passes the addr to a subprocess; brief race window is
// acceptable for a smoke test.
@@ -361,6 +419,34 @@ func pickAddr(t *testing.T) string {
return addr
}
func pollMasterStatus(t *testing.T, masterAddr, volumeID string, deadline time.Duration, check func(*control.StatusResponse) bool) *control.StatusResponse {
t.Helper()
conn, err := grpc.NewClient(masterAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
t.Fatalf("dial master: %v", err)
}
defer conn.Close()
client := control.NewEvidenceServiceClient(conn)
end := time.Now().Add(deadline)
var last *control.StatusResponse
for time.Now().Before(end) {
ctx, cancel := context.WithTimeout(context.Background(), 500*time.Millisecond)
resp, err := client.QueryVolumeStatus(ctx, &control.StatusRequest{VolumeId: volumeID})
cancel()
if err == nil {
last = resp
if check(resp) {
return resp
}
}
time.Sleep(100 * time.Millisecond)
}
if last != nil {
t.Logf("last master status: %+v", last)
}
return nil
}
// silence unused-import warnings on platforms where strings/sync
// aren't picked up (placeholder; both are used above).
var _ = strings.TrimSpace
+16
View File
@@ -25,6 +25,7 @@ import (
"github.com/seaweedfs/seaweed-block/core/host/volume"
"github.com/seaweedfs/seaweed-block/core/recovery"
"github.com/seaweedfs/seaweed-block/core/replication"
control "github.com/seaweedfs/seaweed-block/core/rpc/control"
"github.com/seaweedfs/seaweed-block/core/storage"
"github.com/seaweedfs/seaweed-block/core/transport"
)
@@ -737,6 +738,7 @@ func run(f flags) int {
// behavior).
var iscsiTarget *iscsi.Target
var frontendTargets []*control.FrontendTarget
if f.iscsiListen != "" {
prov := provider
iscsiTarget = iscsi.NewTarget(iscsi.TargetConfig{
@@ -766,6 +768,13 @@ func run(f flags) int {
IscsiAddr: iscsiAddr,
IQN: f.iscsiIQN,
})
frontendTargets = append(frontendTargets, &control.FrontendTarget{
Protocol: "iscsi",
Addr: iscsiAddr,
Iqn: f.iscsiIQN,
Lun: uint32(f.iscsiLUN),
})
h.SetFrontendTargets(frontendTargets)
}
var nvmeTarget *nvme.Target
@@ -806,6 +815,13 @@ func run(f flags) int {
NvmeAddr: nvmeAddr,
SubsysNQN: f.nvmeSubsysNQN,
})
frontendTargets = append(frontendTargets, &control.FrontendTarget{
Protocol: "nvme",
Addr: nvmeAddr,
Nqn: f.nvmeSubsysNQN,
Nsid: uint32(f.nvmeNS),
})
h.SetFrontendTargets(frontendTargets)
}
sig := make(chan os.Signal, 1)
@@ -26,9 +26,9 @@ import (
// rebuild hook so the host can re-synthesize reactively
// (sketch §11).
type ObservationStore struct {
config FreshnessConfig
now func() time.Time
startedAt time.Time
config FreshnessConfig
now func() time.Time
startedAt time.Time
mu sync.Mutex
observations map[string]Observation // key: ServerID
@@ -117,6 +117,7 @@ func (s *ObservationStore) SlotFact(volumeID, replicaID string) (SlotFact, bool)
}
if !found || obs.ObservedAt.After(bestObsAt) {
best = slot
best.Frontends = append([]FrontendTargetFact(nil), slot.Frontends...)
bestObsAt = obs.ObservedAt
found = true
}
@@ -228,13 +229,13 @@ func (s *ObservationStore) Ingest(obs Observation) error {
// API boundary that keeps supportability logic off the
// synthesized-output back-edge (sketch §12 one-way pipeline).
type storeSnapshot struct {
observations map[string]Observation
serverFreshness map[string]ServerFreshness
revision uint64
evaluatedAt time.Time
startedAt time.Time
pendingGrace time.Duration
freshnessWindow time.Duration
observations map[string]Observation
serverFreshness map[string]ServerFreshness
revision uint64
evaluatedAt time.Time
startedAt time.Time
pendingGrace time.Duration
freshnessWindow time.Duration
}
// ServerFreshness is the derived freshness state of one ServerID
@@ -47,6 +47,7 @@ type SlotFact struct {
ReplicaID string
DataAddr string
CtrlAddr string
Frontends []FrontendTargetFact
Reachable bool
ReadyForPrimary bool
Eligible bool
@@ -60,6 +61,19 @@ type SlotFact struct {
LocalRoleClaim LocalRoleClaim
}
// FrontendTargetFact is a read-only fact reported by a volume
// process after it has bound a frontend target. It is intentionally
// NOT an authority, placement, or readiness input; CSI/controller
// surfaces may use it only to publish an already-running endpoint.
type FrontendTargetFact struct {
Protocol string
Addr string
IQN string
NQN string
LUN uint32
NSID uint32
}
// LocalRoleClaim is the raw role claim a server makes about
// itself. Not authority — the authority layer is the only thing
// that mints primary/candidate facts.
@@ -34,11 +34,11 @@ import (
// HeartbeatMessage is the V2-shaped heartbeat payload one
// reporting server sends. Ported as wire mechanism only.
type HeartbeatMessage struct {
ServerID string
SentAt time.Time
Reachable bool
Eligible bool
Slots []HeartbeatSlot
ServerID string
SentAt time.Time
Reachable bool
Eligible bool
Slots []HeartbeatSlot
}
// HeartbeatSlot is the per-slot portion of HeartbeatMessage.
@@ -50,6 +50,7 @@ type HeartbeatSlot struct {
ReplicaID string
DataAddr string
CtrlAddr string
Frontends []FrontendTargetFact
Reachable bool
ReadyForPrimary bool
Eligible bool
@@ -80,11 +81,13 @@ func HeartbeatToObservation(msg HeartbeatMessage) (Observation, error) {
slots := make([]SlotFact, 0, len(msg.Slots))
for _, s := range msg.Slots {
frontends := append([]FrontendTargetFact(nil), s.Frontends...)
slots = append(slots, SlotFact{
VolumeID: s.VolumeID,
ReplicaID: s.ReplicaID,
DataAddr: s.DataAddr,
CtrlAddr: s.CtrlAddr,
Frontends: frontends,
Reachable: s.Reachable,
ReadyForPrimary: s.ReadyForPrimary,
Eligible: s.Eligible,
+75
View File
@@ -0,0 +1,75 @@
package csi
import (
"context"
"fmt"
control "github.com/seaweedfs/seaweed-block/core/rpc/control"
)
// ControlStatusLookup reads master EvidenceService status and
// converts observed frontend facts into CSI publish targets. It is
// intentionally read-only: it does not call lifecycle, placement, or
// authority mutation APIs.
type ControlStatusLookup struct {
client control.EvidenceServiceClient
}
func NewControlStatusLookup(client control.EvidenceServiceClient) *ControlStatusLookup {
return &ControlStatusLookup{client: client}
}
func (l *ControlStatusLookup) LookupPublishTarget(ctx context.Context, volumeID, nodeID string) (PublishTarget, error) {
if l == nil || l.client == nil {
return PublishTarget{}, fmt.Errorf("csi: control status lookup not configured")
}
resp, err := l.client.QueryVolumeStatus(ctx, &control.StatusRequest{VolumeId: volumeID})
if err != nil {
return PublishTarget{}, err
}
if !resp.GetAssigned() || resp.GetReplicaId() == "" {
return PublishTarget{}, ErrPublishTargetNotFound
}
if t, ok := publishTargetFromStatus(resp); ok {
return t, nil
}
return PublishTarget{}, ErrPublishTargetNotFound
}
func publishTargetFromStatus(resp *control.StatusResponse) (PublishTarget, bool) {
if resp == nil {
return PublishTarget{}, false
}
base := PublishTarget{
VolumeID: resp.GetVolumeId(),
ReplicaID: resp.GetReplicaId(),
}
for _, ft := range resp.GetFrontends() {
if ft == nil {
continue
}
switch ft.GetProtocol() {
case string(ProtocolISCSI):
if ft.GetAddr() == "" || ft.GetIqn() == "" {
continue
}
out := base
out.Protocol = ProtocolISCSI
out.ISCSIAddr = ft.GetAddr()
out.IQN = ft.GetIqn()
out.LUN = ft.GetLun()
return out, true
case string(ProtocolNVMe):
if ft.GetAddr() == "" || ft.GetNqn() == "" {
continue
}
out := base
out.Protocol = ProtocolNVMe
out.NVMeAddr = ft.GetAddr()
out.NQN = ft.GetNqn()
out.NSID = ft.GetNsid()
return out, true
}
}
return PublishTarget{}, false
}
@@ -0,0 +1,93 @@
package csi
import (
"context"
"errors"
"testing"
control "github.com/seaweedfs/seaweed-block/core/rpc/control"
"google.golang.org/grpc"
)
type fakeEvidenceClient struct {
resp *control.StatusResponse
err error
reqs []string
}
func (f *fakeEvidenceClient) QueryVolumeStatus(_ context.Context, req *control.StatusRequest, _ ...grpc.CallOption) (*control.StatusResponse, error) {
f.reqs = append(f.reqs, req.GetVolumeId())
if f.err != nil {
return nil, f.err
}
return f.resp, nil
}
func TestControlStatusLookup_MapsISCSIStatusFrontend(t *testing.T) {
client := &fakeEvidenceClient{resp: &control.StatusResponse{
VolumeId: "v1",
ReplicaId: "r1",
Assigned: true,
Frontends: []*control.FrontendTarget{{
Protocol: "iscsi",
Addr: "127.0.0.1:3260",
Iqn: "iqn.2026-05.example:v1",
Lun: 3,
}},
}}
lookup := NewControlStatusLookup(client)
got, err := lookup.LookupPublishTarget(context.Background(), "v1", "node-a")
if err != nil {
t.Fatalf("LookupPublishTarget: %v", err)
}
if got.Protocol != ProtocolISCSI || got.ISCSIAddr != "127.0.0.1:3260" || got.IQN != "iqn.2026-05.example:v1" || got.LUN != 3 {
t.Fatalf("target=%+v", got)
}
if len(client.reqs) != 1 || client.reqs[0] != "v1" {
t.Fatalf("status reqs=%v", client.reqs)
}
}
func TestControlStatusLookup_FailClosedWithoutAssignedFrontend(t *testing.T) {
tests := []struct {
name string
resp *control.StatusResponse
}{
{name: "unassigned", resp: &control.StatusResponse{VolumeId: "v1", Assigned: false}},
{name: "missing-frontends", resp: &control.StatusResponse{VolumeId: "v1", ReplicaId: "r1", Assigned: true}},
{name: "malformed-iscsi", resp: &control.StatusResponse{
VolumeId: "v1", ReplicaId: "r1", Assigned: true,
Frontends: []*control.FrontendTarget{{Protocol: "iscsi", Addr: "127.0.0.1:3260"}},
}},
}
for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {
lookup := NewControlStatusLookup(&fakeEvidenceClient{resp: tc.resp})
if _, err := lookup.LookupPublishTarget(context.Background(), "v1", "node-a"); !errors.Is(err, ErrPublishTargetNotFound) {
t.Fatalf("err=%v want ErrPublishTargetNotFound", err)
}
})
}
}
func TestControlStatusLookup_MapsNVMeStatusFrontend(t *testing.T) {
lookup := NewControlStatusLookup(&fakeEvidenceClient{resp: &control.StatusResponse{
VolumeId: "v1",
ReplicaId: "r1",
Assigned: true,
Frontends: []*control.FrontendTarget{{
Protocol: "nvme",
Addr: "127.0.0.1:4420",
Nqn: "nqn.2026-05.io.seaweedfs:v1",
Nsid: 1,
}},
}})
got, err := lookup.LookupPublishTarget(context.Background(), "v1", "node-a")
if err != nil {
t.Fatalf("LookupPublishTarget: %v", err)
}
if got.Protocol != ProtocolNVMe || got.NVMeAddr != "127.0.0.1:4420" || got.NQN == "" || got.NSID != 1 {
t.Fatalf("target=%+v", got)
}
}
@@ -0,0 +1,101 @@
package master
import (
"testing"
"time"
"github.com/seaweedfs/seaweed-block/core/authority"
control "github.com/seaweedfs/seaweed-block/core/rpc/control"
"google.golang.org/protobuf/types/known/timestamppb"
)
func TestStatusFrontendsForAssignedLine_ReturnsObservedFrontendFacts(t *testing.T) {
obs := authority.NewObservationHost(authority.ObservationHostConfig{})
if err := obs.IngestHeartbeat(authority.HeartbeatMessage{
ServerID: "node-a",
SentAt: time.Now().UTC(),
Reachable: true,
Eligible: true,
Slots: []authority.HeartbeatSlot{{
VolumeID: "v1",
ReplicaID: "r1",
DataAddr: "127.0.0.1:9201",
CtrlAddr: "127.0.0.1:9101",
Frontends: []authority.FrontendTargetFact{{
Protocol: "iscsi",
Addr: "127.0.0.1:3260",
IQN: "iqn.2026-05.example:v1",
LUN: 0,
}},
}},
}); err != nil {
t.Fatalf("ingest heartbeat: %v", err)
}
got := statusFrontendsForAssignedLine(obs, "v1", "r1", true)
if len(got) != 1 {
t.Fatalf("frontends=%d want 1", len(got))
}
if got[0].GetProtocol() != "iscsi" || got[0].GetAddr() != "127.0.0.1:3260" || got[0].GetIqn() != "iqn.2026-05.example:v1" {
t.Fatalf("frontend target=%+v", got[0])
}
}
func TestStatusFrontendsForAssignedLine_FailClosedWhenUnassignedOrMissing(t *testing.T) {
obs := authority.NewObservationHost(authority.ObservationHostConfig{})
if got := statusFrontendsForAssignedLine(obs, "v1", "r1", false); len(got) != 0 {
t.Fatalf("unassigned frontends=%+v want nil", got)
}
if got := statusFrontendsForAssignedLine(obs, "v1", "r1", true); len(got) != 0 {
t.Fatalf("missing observation frontends=%+v want nil", got)
}
}
func TestValidateHeartbeat_RejectsMalformedFrontendFacts(t *testing.T) {
base := func(ft *controlFrontend) error {
return validateHeartbeat(ft.report())
}
cases := []struct {
name string
ft controlFrontend
}{
{name: "empty-protocol", ft: controlFrontend{addr: "127.0.0.1:3260", iqn: "iqn.x"}},
{name: "empty-addr", ft: controlFrontend{protocol: "iscsi", iqn: "iqn.x"}},
{name: "iscsi-empty-iqn", ft: controlFrontend{protocol: "iscsi", addr: "127.0.0.1:3260"}},
{name: "nvme-empty-nqn", ft: controlFrontend{protocol: "nvme", addr: "127.0.0.1:4420"}},
{name: "bad-protocol", ft: controlFrontend{protocol: "nfs", addr: "127.0.0.1:2049"}},
}
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
if err := base(&tc.ft); err == nil {
t.Fatal("expected validation error")
}
})
}
}
type controlFrontend struct {
protocol string
addr string
iqn string
nqn string
}
func (f controlFrontend) report() *control.HeartbeatReport {
return &control.HeartbeatReport{
ServerId: "node-a",
SentAt: timestamppb.Now(),
Slots: []*control.HeartbeatSlot{{
VolumeId: "v1",
ReplicaId: "r1",
DataAddr: "127.0.0.1:9201",
CtrlAddr: "127.0.0.1:9101",
Frontends: []*control.FrontendTarget{{
Protocol: f.protocol,
Addr: f.addr,
Iqn: f.iqn,
Nqn: f.nqn,
}},
}},
}
}
+82 -12
View File
@@ -237,6 +237,7 @@ func (s *services) QueryVolumeStatus(ctx context.Context, req *control.StatusReq
resp.ReplicaId = line.ReplicaID
resp.Epoch = line.Epoch
resp.EndpointVersion = line.EndpointVersion
resp.Frontends = statusFrontendsForAssignedLine(s.host.obs, req.VolumeId, line.ReplicaID, line.Assigned)
}
if ev, ok := ctrl.LastUnsupported(req.VolumeId); ok {
resp.LastUnsupportedReason = ev.Reason
@@ -247,6 +248,16 @@ func (s *services) QueryVolumeStatus(ctx context.Context, req *control.StatusReq
return resp, nil
}
func statusFrontendsForAssignedLine(obs *authority.ObservationHost, volumeID, replicaID string, assigned bool) []*control.FrontendTarget {
if !assigned || obs == nil {
return nil
}
if slot, ok := obs.Store().SlotFact(volumeID, replicaID); ok {
return frontendTargetsToWire(slot.Frontends)
}
return nil
}
// validateHeartbeat rejects reports that are missing required
// fields. Malformed reports MUST NOT reach IngestHeartbeat —
// sketch §8.2.1 rule 8 (G1 malformed-reject) demands fail-closed.
@@ -284,6 +295,26 @@ func validateHeartbeat(r *control.HeartbeatReport) error {
if s.DataAddr == "" || s.CtrlAddr == "" {
return fmt.Errorf("heartbeat: slot[%d] (%s/%s) missing DataAddr or CtrlAddr", i, s.VolumeId, s.ReplicaId)
}
for j, ft := range s.Frontends {
if ft == nil {
return fmt.Errorf("heartbeat: slot[%d].frontends[%d] is nil", i, j)
}
if ft.Protocol == "" || ft.Addr == "" {
return fmt.Errorf("heartbeat: slot[%d].frontends[%d] missing protocol or addr", i, j)
}
switch ft.Protocol {
case "iscsi":
if ft.Iqn == "" {
return fmt.Errorf("heartbeat: slot[%d].frontends[%d] iscsi missing iqn", i, j)
}
case "nvme":
if ft.Nqn == "" {
return fmt.Errorf("heartbeat: slot[%d].frontends[%d] nvme missing nqn", i, j)
}
default:
return fmt.Errorf("heartbeat: slot[%d].frontends[%d] unsupported protocol %q", i, j, ft.Protocol)
}
}
}
return nil
}
@@ -318,19 +349,19 @@ func generationFitsUint32(epoch, endpointVersion uint64) (reason string, ok bool
// Per-slot resolution (G5-5A architect ratification 2026-04-27,
// refined at round-54 review):
//
// 1. AUTHORITY path: for slots whose authority is published (the
// bound replica + any historically-bound replicas with retained
// records), pull DataAddr/CtrlAddr from `LastPublished` (this
// is the freshest authoritative addr — refreshed via
// IntentRefreshEndpoint).
// 1. AUTHORITY path: for slots whose authority is published (the
// bound replica + any historically-bound replicas with retained
// records), pull DataAddr/CtrlAddr from `LastPublished` (this
// is the freshest authoritative addr — refreshed via
// IntentRefreshEndpoint).
//
// 2. OBSERVATION path: for slots that ARE declared in topology
// but have NO published authority line (the common case for
// supporting replicas — Publisher.apply only mints for the
// bound replica), pull DataAddr/CtrlAddr from the observation
// store's freshest non-expired heartbeat. pub.state stays
// authority-only — architect option (B) "mint presence
// records" REJECTED.
// 2. OBSERVATION path: for slots that ARE declared in topology
// but have NO published authority line (the common case for
// supporting replicas — Publisher.apply only mints for the
// bound replica), pull DataAddr/CtrlAddr from the observation
// store's freshest non-expired heartbeat. pub.state stays
// authority-only — architect option (B) "mint presence
// records" REJECTED.
//
// Both paths stamp peer.Epoch / peer.EndpointVersion with the
// SUBSCRIBING PRIMARY's lineage, NOT the peer's own. Rationale:
@@ -454,6 +485,7 @@ func heartbeatFromWire(r *control.HeartbeatReport) authority.HeartbeatMessage {
ReplicaID: s.ReplicaId,
DataAddr: s.DataAddr,
CtrlAddr: s.CtrlAddr,
Frontends: frontendTargetsFromWire(s.Frontends),
Reachable: s.Reachable,
ReadyForPrimary: s.ReadyForPrimary,
Eligible: s.Eligible,
@@ -471,3 +503,41 @@ func heartbeatFromWire(r *control.HeartbeatReport) authority.HeartbeatMessage {
}
}
func frontendTargetsFromWire(in []*control.FrontendTarget) []authority.FrontendTargetFact {
if len(in) == 0 {
return nil
}
out := make([]authority.FrontendTargetFact, 0, len(in))
for _, ft := range in {
if ft == nil {
continue
}
out = append(out, authority.FrontendTargetFact{
Protocol: ft.Protocol,
Addr: ft.Addr,
IQN: ft.Iqn,
NQN: ft.Nqn,
LUN: ft.Lun,
NSID: ft.Nsid,
})
}
return out
}
func frontendTargetsToWire(in []authority.FrontendTargetFact) []*control.FrontendTarget {
if len(in) == 0 {
return nil
}
out := make([]*control.FrontendTarget, 0, len(in))
for _, ft := range in {
out = append(out, &control.FrontendTarget{
Protocol: ft.Protocol,
Addr: ft.Addr,
Iqn: ft.IQN,
Nqn: ft.NQN,
Lun: ft.LUN,
Nsid: ft.NSID,
})
}
return out
}
@@ -0,0 +1,77 @@
package volume
import (
"testing"
control "github.com/seaweedfs/seaweed-block/core/rpc/control"
)
func TestHost_SetFrontendTargets_IncludedInHeartbeat(t *testing.T) {
h := newTestVolumeHost(t)
defer func() { _ = h.Close() }()
targets := []*control.FrontendTarget{{
Protocol: "iscsi",
Addr: "127.0.0.1:3260",
Iqn: "iqn.2026-05.example:v1",
Lun: 7,
}}
h.SetFrontendTargets(targets)
targets[0].Addr = "mutated:3260"
report := h.buildReport()
if len(report.GetSlots()) != 1 {
t.Fatalf("slots=%d want 1", len(report.GetSlots()))
}
got := report.GetSlots()[0].GetFrontends()
if len(got) != 1 {
t.Fatalf("frontends=%d want 1", len(got))
}
if got[0].GetProtocol() != "iscsi" || got[0].GetAddr() != "127.0.0.1:3260" || got[0].GetIqn() != "iqn.2026-05.example:v1" {
t.Fatalf("frontend target copied incorrectly: %+v", got[0])
}
if got[0].GetLun() != 7 {
t.Fatalf("lun=%d want 7", got[0].GetLun())
}
}
func TestHost_SetFrontendTargets_ReplacesPreviousSet(t *testing.T) {
h := newTestVolumeHost(t)
defer func() { _ = h.Close() }()
h.SetFrontendTargets([]*control.FrontendTarget{{
Protocol: "iscsi",
Addr: "127.0.0.1:3260",
Iqn: "iqn.old:v1",
}})
h.SetFrontendTargets([]*control.FrontendTarget{{
Protocol: "nvme",
Addr: "127.0.0.1:4420",
Nqn: "nqn.2026-05.io.seaweedfs:v1",
Nsid: 1,
}})
got := h.buildReport().GetSlots()[0].GetFrontends()
if len(got) != 1 {
t.Fatalf("frontends=%d want replacement singleton", len(got))
}
if got[0].GetProtocol() != "nvme" || got[0].GetNqn() == "" {
t.Fatalf("replacement frontend not reflected: %+v", got[0])
}
}
func newTestVolumeHost(t *testing.T) *Host {
t.Helper()
h, err := New(Config{
MasterAddr: "127.0.0.1:1",
ServerID: "node-a",
VolumeID: "v1",
ReplicaID: "r1",
DataAddr: "127.0.0.1:9201",
CtrlAddr: "127.0.0.1:9101",
})
if err != nil {
t.Fatalf("volume.New: %v", err)
}
return h
}
+47 -14
View File
@@ -90,11 +90,11 @@ type replicaSetUpdater interface {
// Host is the composed volume-side block product daemon.
type Host struct {
cfg Config
log *log.Logger
exec *noopExecutor
cfg Config
log *log.Logger
exec *noopExecutor
t1exec *HealthyPathExecutor
adpt assignmentConsumer
adpt assignmentConsumer
// realAdpt is the underlying concrete adapter. Exposed for
// production call sites that need the full surface (status
// server, projection view wiring). Tests swap adpt only and
@@ -128,6 +128,9 @@ type Host struct {
// demotion side effects in this slice.
otherMu sync.Mutex
lastOther *control.AssignmentFact
frontendMu sync.RWMutex
frontendTargets []*control.FrontendTarget
}
// LastOtherLine returns the most recent VOLUME authority fact
@@ -191,8 +194,8 @@ func New(cfg Config) (*Host, error) {
// not-Healthy); T1 readiness bridge swaps in HealthyPathExecutor
// so the adapter can actually reach engine.ModeHealthy.
var (
noopExec *noopExecutor
t1Exec *HealthyPathExecutor
noopExec *noopExecutor
t1Exec *HealthyPathExecutor
execIface adapter.CommandExecutor
)
if cfg.EnableT1Readiness {
@@ -205,15 +208,15 @@ func New(cfg Config) (*Host, error) {
adpt := adapter.NewVolumeReplicaAdapter(execIface)
h := &Host{
cfg: cfg,
log: lg,
exec: noopExec,
t1exec: t1Exec,
adpt: adpt,
cfg: cfg,
log: lg,
exec: noopExec,
t1exec: t1Exec,
adpt: adpt,
realAdpt: adpt,
conn: conn,
obsCli: control.NewObservationServiceClient(conn),
asnCli: control.NewAssignmentServiceClient(conn),
conn: conn,
obsCli: control.NewObservationServiceClient(conn),
asnCli: control.NewAssignmentServiceClient(conn),
}
if cfg.ReplicationVolume != nil {
h.setReplicationLocked(cfg.ReplicationVolume)
@@ -302,6 +305,35 @@ func (h *Host) Adapter() *adapter.VolumeReplicaAdapter { return h.realAdpt }
// inspect recorded commands.
func (h *Host) Executor() *noopExecutor { return h.exec }
// SetFrontendTargets publishes read-only frontend target facts into
// the next heartbeat. These facts are endpoint observations only:
// they do not change assignment, readiness, or authority state.
func (h *Host) SetFrontendTargets(targets []*control.FrontendTarget) {
h.frontendMu.Lock()
defer h.frontendMu.Unlock()
h.frontendTargets = cloneFrontendTargets(targets)
}
func (h *Host) frontendTargetsSnapshot() []*control.FrontendTarget {
h.frontendMu.RLock()
defer h.frontendMu.RUnlock()
return cloneFrontendTargets(h.frontendTargets)
}
func cloneFrontendTargets(in []*control.FrontendTarget) []*control.FrontendTarget {
if len(in) == 0 {
return nil
}
out := make([]*control.FrontendTarget, 0, len(in))
for _, t := range in {
if t == nil {
continue
}
out = append(out, proto.Clone(t).(*control.FrontendTarget))
}
return out
}
// Start kicks off the heartbeat loop + subscribe loop. Returns a
// context cancelled on Close.
func (h *Host) Start() context.Context {
@@ -370,6 +402,7 @@ func (h *Host) buildReport() *control.HeartbeatReport {
ReplicaId: h.cfg.ReplicaID,
DataAddr: h.cfg.DataAddr,
CtrlAddr: h.cfg.CtrlAddr,
Frontends: h.frontendTargetsSnapshot(),
Reachable: true,
ReadyForPrimary: true,
Eligible: true,
+293 -152
View File
@@ -127,16 +127,17 @@ type HeartbeatSlot struct {
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"`
DataAddr string `protobuf:"bytes,3,opt,name=data_addr,json=dataAddr,proto3" json:"data_addr,omitempty"`
CtrlAddr string `protobuf:"bytes,4,opt,name=ctrl_addr,json=ctrlAddr,proto3" json:"ctrl_addr,omitempty"`
Reachable bool `protobuf:"varint,5,opt,name=reachable,proto3" json:"reachable,omitempty"`
ReadyForPrimary bool `protobuf:"varint,6,opt,name=ready_for_primary,json=readyForPrimary,proto3" json:"ready_for_primary,omitempty"`
Eligible bool `protobuf:"varint,7,opt,name=eligible,proto3" json:"eligible,omitempty"`
Withdrawn bool `protobuf:"varint,8,opt,name=withdrawn,proto3" json:"withdrawn,omitempty"`
EvidenceScore uint64 `protobuf:"varint,9,opt,name=evidence_score,json=evidenceScore,proto3" json:"evidence_score,omitempty"`
LocalRoleClaim uint32 `protobuf:"varint,10,opt,name=local_role_claim,json=localRoleClaim,proto3" json:"local_role_claim,omitempty"` // authority.LocalRoleClaim enum value
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"`
DataAddr string `protobuf:"bytes,3,opt,name=data_addr,json=dataAddr,proto3" json:"data_addr,omitempty"`
CtrlAddr string `protobuf:"bytes,4,opt,name=ctrl_addr,json=ctrlAddr,proto3" json:"ctrl_addr,omitempty"`
Reachable bool `protobuf:"varint,5,opt,name=reachable,proto3" json:"reachable,omitempty"`
ReadyForPrimary bool `protobuf:"varint,6,opt,name=ready_for_primary,json=readyForPrimary,proto3" json:"ready_for_primary,omitempty"`
Eligible bool `protobuf:"varint,7,opt,name=eligible,proto3" json:"eligible,omitempty"`
Withdrawn bool `protobuf:"varint,8,opt,name=withdrawn,proto3" json:"withdrawn,omitempty"`
EvidenceScore uint64 `protobuf:"varint,9,opt,name=evidence_score,json=evidenceScore,proto3" json:"evidence_score,omitempty"`
LocalRoleClaim uint32 `protobuf:"varint,10,opt,name=local_role_claim,json=localRoleClaim,proto3" json:"local_role_claim,omitempty"` // authority.LocalRoleClaim enum value
Frontends []*FrontendTarget `protobuf:"bytes,11,rep,name=frontends,proto3" json:"frontends,omitempty"`
}
func (x *HeartbeatSlot) Reset() {
@@ -241,6 +242,105 @@ func (x *HeartbeatSlot) GetLocalRoleClaim() uint32 {
return 0
}
func (x *HeartbeatSlot) GetFrontends() []*FrontendTarget {
if x != nil {
return x.Frontends
}
return nil
}
// FrontendTarget — read-only frontend publication fact reported by
// a blockvolume process. This is an observation/status fact only:
// CSI may consume it to publish an already-running target, but
// master/authority MUST NOT treat it as an assignment, readiness, or
// placement input.
type FrontendTarget struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Protocol string `protobuf:"bytes,1,opt,name=protocol,proto3" json:"protocol,omitempty"` // "iscsi" | "nvme"
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
Iqn string `protobuf:"bytes,3,opt,name=iqn,proto3" json:"iqn,omitempty"`
Nqn string `protobuf:"bytes,4,opt,name=nqn,proto3" json:"nqn,omitempty"`
Lun uint32 `protobuf:"varint,5,opt,name=lun,proto3" json:"lun,omitempty"`
Nsid uint32 `protobuf:"varint,6,opt,name=nsid,proto3" json:"nsid,omitempty"`
}
func (x *FrontendTarget) Reset() {
*x = FrontendTarget{}
if protoimpl.UnsafeEnabled {
mi := &file_control_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FrontendTarget) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FrontendTarget) ProtoMessage() {}
func (x *FrontendTarget) ProtoReflect() protoreflect.Message {
mi := &file_control_proto_msgTypes[2]
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 FrontendTarget.ProtoReflect.Descriptor instead.
func (*FrontendTarget) Descriptor() ([]byte, []int) {
return file_control_proto_rawDescGZIP(), []int{2}
}
func (x *FrontendTarget) GetProtocol() string {
if x != nil {
return x.Protocol
}
return ""
}
func (x *FrontendTarget) GetAddr() string {
if x != nil {
return x.Addr
}
return ""
}
func (x *FrontendTarget) GetIqn() string {
if x != nil {
return x.Iqn
}
return ""
}
func (x *FrontendTarget) GetNqn() string {
if x != nil {
return x.Nqn
}
return ""
}
func (x *FrontendTarget) GetLun() uint32 {
if x != nil {
return x.Lun
}
return 0
}
func (x *FrontendTarget) GetNsid() uint32 {
if x != nil {
return x.Nsid
}
return 0
}
type HeartbeatAck struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -253,7 +353,7 @@ type HeartbeatAck struct {
func (x *HeartbeatAck) Reset() {
*x = HeartbeatAck{}
if protoimpl.UnsafeEnabled {
mi := &file_control_proto_msgTypes[2]
mi := &file_control_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -266,7 +366,7 @@ func (x *HeartbeatAck) String() string {
func (*HeartbeatAck) ProtoMessage() {}
func (x *HeartbeatAck) ProtoReflect() protoreflect.Message {
mi := &file_control_proto_msgTypes[2]
mi := &file_control_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -279,7 +379,7 @@ func (x *HeartbeatAck) ProtoReflect() protoreflect.Message {
// Deprecated: Use HeartbeatAck.ProtoReflect.Descriptor instead.
func (*HeartbeatAck) Descriptor() ([]byte, []int) {
return file_control_proto_rawDescGZIP(), []int{2}
return file_control_proto_rawDescGZIP(), []int{3}
}
func (x *HeartbeatAck) GetAcceptedAt() *timestamp.Timestamp {
@@ -309,7 +409,7 @@ type SubscribeRequest struct {
func (x *SubscribeRequest) Reset() {
*x = SubscribeRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_control_proto_msgTypes[3]
mi := &file_control_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -322,7 +422,7 @@ func (x *SubscribeRequest) String() string {
func (*SubscribeRequest) ProtoMessage() {}
func (x *SubscribeRequest) ProtoReflect() protoreflect.Message {
mi := &file_control_proto_msgTypes[3]
mi := &file_control_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -335,7 +435,7 @@ func (x *SubscribeRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.
func (*SubscribeRequest) Descriptor() ([]byte, []int) {
return file_control_proto_rawDescGZIP(), []int{3}
return file_control_proto_rawDescGZIP(), []int{4}
}
func (x *SubscribeRequest) GetVolumeId() string {
@@ -381,7 +481,7 @@ type ReplicaDescriptor struct {
func (x *ReplicaDescriptor) Reset() {
*x = ReplicaDescriptor{}
if protoimpl.UnsafeEnabled {
mi := &file_control_proto_msgTypes[4]
mi := &file_control_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -394,7 +494,7 @@ func (x *ReplicaDescriptor) String() string {
func (*ReplicaDescriptor) ProtoMessage() {}
func (x *ReplicaDescriptor) ProtoReflect() protoreflect.Message {
mi := &file_control_proto_msgTypes[4]
mi := &file_control_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -407,7 +507,7 @@ func (x *ReplicaDescriptor) ProtoReflect() protoreflect.Message {
// Deprecated: Use ReplicaDescriptor.ProtoReflect.Descriptor instead.
func (*ReplicaDescriptor) Descriptor() ([]byte, []int) {
return file_control_proto_rawDescGZIP(), []int{4}
return file_control_proto_rawDescGZIP(), []int{5}
}
func (x *ReplicaDescriptor) GetReplicaId() string {
@@ -485,7 +585,7 @@ type AssignmentFact struct {
func (x *AssignmentFact) Reset() {
*x = AssignmentFact{}
if protoimpl.UnsafeEnabled {
mi := &file_control_proto_msgTypes[5]
mi := &file_control_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -498,7 +598,7 @@ func (x *AssignmentFact) String() string {
func (*AssignmentFact) ProtoMessage() {}
func (x *AssignmentFact) ProtoReflect() protoreflect.Message {
mi := &file_control_proto_msgTypes[5]
mi := &file_control_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -511,7 +611,7 @@ func (x *AssignmentFact) ProtoReflect() protoreflect.Message {
// Deprecated: Use AssignmentFact.ProtoReflect.Descriptor instead.
func (*AssignmentFact) Descriptor() ([]byte, []int) {
return file_control_proto_rawDescGZIP(), []int{5}
return file_control_proto_rawDescGZIP(), []int{6}
}
func (x *AssignmentFact) GetVolumeId() string {
@@ -581,7 +681,7 @@ type StatusRequest struct {
func (x *StatusRequest) Reset() {
*x = StatusRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_control_proto_msgTypes[6]
mi := &file_control_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -594,7 +694,7 @@ func (x *StatusRequest) String() string {
func (*StatusRequest) ProtoMessage() {}
func (x *StatusRequest) ProtoReflect() protoreflect.Message {
mi := &file_control_proto_msgTypes[6]
mi := &file_control_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -607,7 +707,7 @@ func (x *StatusRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.
func (*StatusRequest) Descriptor() ([]byte, []int) {
return file_control_proto_rawDescGZIP(), []int{6}
return file_control_proto_rawDescGZIP(), []int{7}
}
func (x *StatusRequest) GetVolumeId() string {
@@ -625,19 +725,20 @@ type StatusResponse struct {
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"`
Epoch uint64 `protobuf:"varint,3,opt,name=epoch,proto3" json:"epoch,omitempty"`
EndpointVersion uint64 `protobuf:"varint,4,opt,name=endpoint_version,json=endpointVersion,proto3" json:"endpoint_version,omitempty"`
Assigned bool `protobuf:"varint,5,opt,name=assigned,proto3" json:"assigned,omitempty"`
LastUnsupportedReason string `protobuf:"bytes,6,opt,name=last_unsupported_reason,json=lastUnsupportedReason,proto3" json:"last_unsupported_reason,omitempty"`
LastConvergenceStuckAt string `protobuf:"bytes,7,opt,name=last_convergence_stuck_at,json=lastConvergenceStuckAt,proto3" json:"last_convergence_stuck_at,omitempty"`
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"`
Epoch uint64 `protobuf:"varint,3,opt,name=epoch,proto3" json:"epoch,omitempty"`
EndpointVersion uint64 `protobuf:"varint,4,opt,name=endpoint_version,json=endpointVersion,proto3" json:"endpoint_version,omitempty"`
Assigned bool `protobuf:"varint,5,opt,name=assigned,proto3" json:"assigned,omitempty"`
LastUnsupportedReason string `protobuf:"bytes,6,opt,name=last_unsupported_reason,json=lastUnsupportedReason,proto3" json:"last_unsupported_reason,omitempty"`
LastConvergenceStuckAt string `protobuf:"bytes,7,opt,name=last_convergence_stuck_at,json=lastConvergenceStuckAt,proto3" json:"last_convergence_stuck_at,omitempty"`
Frontends []*FrontendTarget `protobuf:"bytes,8,rep,name=frontends,proto3" json:"frontends,omitempty"`
}
func (x *StatusResponse) Reset() {
*x = StatusResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_control_proto_msgTypes[7]
mi := &file_control_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -650,7 +751,7 @@ func (x *StatusResponse) String() string {
func (*StatusResponse) ProtoMessage() {}
func (x *StatusResponse) ProtoReflect() protoreflect.Message {
mi := &file_control_proto_msgTypes[7]
mi := &file_control_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -663,7 +764,7 @@ func (x *StatusResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.
func (*StatusResponse) Descriptor() ([]byte, []int) {
return file_control_proto_rawDescGZIP(), []int{7}
return file_control_proto_rawDescGZIP(), []int{8}
}
func (x *StatusResponse) GetVolumeId() string {
@@ -715,6 +816,13 @@ func (x *StatusResponse) GetLastConvergenceStuckAt() string {
return ""
}
func (x *StatusResponse) GetFrontends() []*FrontendTarget {
if x != nil {
return x.Frontends
}
return nil
}
var File_control_proto protoreflect.FileDescriptor
var file_control_proto_rawDesc = []byte{
@@ -736,7 +844,7 @@ var file_control_proto_rawDesc = []byte{
0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 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, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x53, 0x6c, 0x6f, 0x74,
0x52, 0x05, 0x73, 0x6c, 0x6f, 0x74, 0x73, 0x22, 0xda, 0x02, 0x0a, 0x0d, 0x48, 0x65, 0x61, 0x72,
0x52, 0x05, 0x73, 0x6c, 0x6f, 0x74, 0x73, 0x22, 0xa1, 0x03, 0x0a, 0x0d, 0x48, 0x65, 0x61, 0x72,
0x74, 0x62, 0x65, 0x61, 0x74, 0x53, 0x6c, 0x6f, 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,
@@ -758,100 +866,118 @@ var file_control_proto_rawDesc = []byte{
0x64, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x6c, 0x6f,
0x63, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x18, 0x0a,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x6f, 0x6c, 0x65, 0x43,
0x6c, 0x61, 0x69, 0x6d, 0x22, 0x67, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61,
0x74, 0x41, 0x63, 0x6b, 0x12, 0x3b, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64,
0x5f, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x41,
0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x71, 0x0a,
0x10, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x6c, 0x61, 0x69, 0x6d, 0x12, 0x45, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64,
0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 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, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74,
0x52, 0x09, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x73, 0x22, 0x8a, 0x01, 0x0a, 0x0e,
0x46, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x1a,
0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64,
0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x10,
0x0a, 0x03, 0x69, 0x71, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x71, 0x6e,
0x12, 0x10, 0x0a, 0x03, 0x6e, 0x71, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6e,
0x71, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x75, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x03, 0x6c, 0x75, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x73, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x04, 0x6e, 0x73, 0x69, 0x64, 0x22, 0x67, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x72,
0x74, 0x62, 0x65, 0x61, 0x74, 0x41, 0x63, 0x6b, 0x12, 0x3b, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65,
0x70, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x70,
0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63,
0x65, 0x22, 0x71, 0x0a, 0x10, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 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, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x5f, 0x65, 0x70, 0x6f, 0x63,
0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x45,
0x70, 0x6f, 0x63, 0x68, 0x22, 0xad, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61,
0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65,
0x70, 0x6c, 0x69, 0x63, 0x61, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f,
0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12,
0x29, 0x0a, 0x10, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f,
0x69, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61,
0x74, 0x61, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64,
0x61, 0x74, 0x61, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x74, 0x72, 0x6c, 0x5f,
0x61, 0x64, 0x64, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x74, 0x72, 0x6c,
0x41, 0x64, 0x64, 0x72, 0x22, 0xb9, 0x02, 0x0a, 0x0e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d,
0x65, 0x6e, 0x74, 0x46, 0x61, 0x63, 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, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01,
0x28, 0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x6e, 0x64,
0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20,
0x01, 0x28, 0x04, 0x52, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x56, 0x65, 0x72,
0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x64, 0x64,
0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x41, 0x64, 0x64,
0x72, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x74, 0x72, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x06,
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x74, 0x72, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x12, 0x40,
0x0a, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 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, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x44,
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73,
0x12, 0x2e, 0x0a, 0x13, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x67, 0x65, 0x6e,
0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x70,
0x65, 0x65, 0x72, 0x53, 0x65, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x22, 0x2c, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x22, 0xe3,
0x02, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 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, 0x21, 0x0a,
0x0c, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20,
0x01, 0x28, 0x04, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x45, 0x70, 0x6f, 0x63, 0x68,
0x22, 0xad, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x44, 0x65, 0x73, 0x63,
0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63,
0x61, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x70, 0x6c,
0x69, 0x63, 0x61, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x02,
0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x29, 0x0a, 0x10, 0x65,
0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18,
0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x56,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61,
0x64, 0x64, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x41,
0x64, 0x64, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x74, 0x72, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72,
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x74, 0x72, 0x6c, 0x41, 0x64, 0x64, 0x72,
0x22, 0xb9, 0x02, 0x0a, 0x0e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x46,
0x61, 0x63, 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,
0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05,
0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e,
0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52,
0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x05, 0x20,
0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1b, 0x0a,
0x09, 0x63, 0x74, 0x72, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
0x52, 0x08, 0x63, 0x74, 0x72, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x12, 0x40, 0x0a, 0x05, 0x70, 0x65,
0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 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, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x44, 0x65, 0x73, 0x63, 0x72,
0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x13,
0x70, 0x65, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x70, 0x65, 0x65, 0x72, 0x53,
0x65, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0x0a, 0x0d,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x22, 0x9c, 0x02, 0x0a, 0x0e, 0x53,
0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f,
0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12,
0x29, 0x0a, 0x10, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f,
0x69, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x73,
0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x61, 0x73,
0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x17, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75,
0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f,
0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x6e, 0x73,
0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x39,
0x0a, 0x19, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x67, 0x65, 0x6e,
0x63, 0x65, 0x5f, 0x73, 0x74, 0x75, 0x63, 0x6b, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28,
0x09, 0x52, 0x16, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x67, 0x65, 0x6e,
0x63, 0x65, 0x53, 0x74, 0x75, 0x63, 0x6b, 0x41, 0x74, 0x32, 0x78, 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,
0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x49, 0x64, 0x12, 0x14, 0x0a,
0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x65, 0x70,
0x6f, 0x63, 0x68, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f,
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x65,
0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a,
0x0a, 0x08, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08,
0x52, 0x08, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x17, 0x6c, 0x61,
0x73, 0x74, 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x72,
0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6c, 0x61, 0x73,
0x74, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73,
0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x19, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x76, 0x65,
0x72, 0x67, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x75, 0x63, 0x6b, 0x5f, 0x61, 0x74, 0x18,
0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65,
0x72, 0x67, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x74, 0x75, 0x63, 0x6b, 0x41, 0x74, 0x12, 0x45, 0x0a,
0x09, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b,
0x32, 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, 0x46, 0x72, 0x6f, 0x6e, 0x74,
0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x09, 0x66, 0x72, 0x6f, 0x6e, 0x74,
0x65, 0x6e, 0x64, 0x73, 0x32, 0x78, 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, 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, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 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,
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, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 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,
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, 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 (
@@ -866,34 +992,37 @@ func file_control_proto_rawDescGZIP() []byte {
return file_control_proto_rawDescData
}
var file_control_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_control_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_control_proto_goTypes = []interface{}{
(*HeartbeatReport)(nil), // 0: seaweedfs.block.control.HeartbeatReport
(*HeartbeatSlot)(nil), // 1: seaweedfs.block.control.HeartbeatSlot
(*HeartbeatAck)(nil), // 2: seaweedfs.block.control.HeartbeatAck
(*SubscribeRequest)(nil), // 3: seaweedfs.block.control.SubscribeRequest
(*ReplicaDescriptor)(nil), // 4: seaweedfs.block.control.ReplicaDescriptor
(*AssignmentFact)(nil), // 5: seaweedfs.block.control.AssignmentFact
(*StatusRequest)(nil), // 6: seaweedfs.block.control.StatusRequest
(*StatusResponse)(nil), // 7: seaweedfs.block.control.StatusResponse
(*timestamp.Timestamp)(nil), // 8: google.protobuf.Timestamp
(*FrontendTarget)(nil), // 2: seaweedfs.block.control.FrontendTarget
(*HeartbeatAck)(nil), // 3: seaweedfs.block.control.HeartbeatAck
(*SubscribeRequest)(nil), // 4: seaweedfs.block.control.SubscribeRequest
(*ReplicaDescriptor)(nil), // 5: seaweedfs.block.control.ReplicaDescriptor
(*AssignmentFact)(nil), // 6: seaweedfs.block.control.AssignmentFact
(*StatusRequest)(nil), // 7: seaweedfs.block.control.StatusRequest
(*StatusResponse)(nil), // 8: seaweedfs.block.control.StatusResponse
(*timestamp.Timestamp)(nil), // 9: google.protobuf.Timestamp
}
var file_control_proto_depIdxs = []int32{
8, // 0: seaweedfs.block.control.HeartbeatReport.sent_at:type_name -> google.protobuf.Timestamp
9, // 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
8, // 2: seaweedfs.block.control.HeartbeatAck.accepted_at:type_name -> google.protobuf.Timestamp
4, // 3: seaweedfs.block.control.AssignmentFact.peers:type_name -> seaweedfs.block.control.ReplicaDescriptor
0, // 4: seaweedfs.block.control.ObservationService.ReportHeartbeat:input_type -> seaweedfs.block.control.HeartbeatReport
3, // 5: seaweedfs.block.control.AssignmentService.SubscribeAssignments:input_type -> seaweedfs.block.control.SubscribeRequest
6, // 6: seaweedfs.block.control.EvidenceService.QueryVolumeStatus:input_type -> seaweedfs.block.control.StatusRequest
2, // 7: seaweedfs.block.control.ObservationService.ReportHeartbeat:output_type -> seaweedfs.block.control.HeartbeatAck
5, // 8: seaweedfs.block.control.AssignmentService.SubscribeAssignments:output_type -> seaweedfs.block.control.AssignmentFact
7, // 9: seaweedfs.block.control.EvidenceService.QueryVolumeStatus:output_type -> seaweedfs.block.control.StatusResponse
7, // [7:10] is the sub-list for method output_type
4, // [4:7] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
2, // 2: seaweedfs.block.control.HeartbeatSlot.frontends:type_name -> seaweedfs.block.control.FrontendTarget
9, // 3: seaweedfs.block.control.HeartbeatAck.accepted_at:type_name -> google.protobuf.Timestamp
5, // 4: seaweedfs.block.control.AssignmentFact.peers:type_name -> seaweedfs.block.control.ReplicaDescriptor
2, // 5: seaweedfs.block.control.StatusResponse.frontends:type_name -> seaweedfs.block.control.FrontendTarget
0, // 6: seaweedfs.block.control.ObservationService.ReportHeartbeat:input_type -> seaweedfs.block.control.HeartbeatReport
4, // 7: seaweedfs.block.control.AssignmentService.SubscribeAssignments:input_type -> seaweedfs.block.control.SubscribeRequest
7, // 8: seaweedfs.block.control.EvidenceService.QueryVolumeStatus:input_type -> seaweedfs.block.control.StatusRequest
3, // 9: seaweedfs.block.control.ObservationService.ReportHeartbeat:output_type -> seaweedfs.block.control.HeartbeatAck
6, // 10: seaweedfs.block.control.AssignmentService.SubscribeAssignments:output_type -> seaweedfs.block.control.AssignmentFact
8, // 11: seaweedfs.block.control.EvidenceService.QueryVolumeStatus:output_type -> seaweedfs.block.control.StatusResponse
9, // [9:12] is the sub-list for method output_type
6, // [6:9] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_control_proto_init() }
@@ -927,7 +1056,7 @@ func file_control_proto_init() {
}
}
file_control_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HeartbeatAck); i {
switch v := v.(*FrontendTarget); i {
case 0:
return &v.state
case 1:
@@ -939,7 +1068,7 @@ func file_control_proto_init() {
}
}
file_control_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SubscribeRequest); i {
switch v := v.(*HeartbeatAck); i {
case 0:
return &v.state
case 1:
@@ -951,7 +1080,7 @@ func file_control_proto_init() {
}
}
file_control_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ReplicaDescriptor); i {
switch v := v.(*SubscribeRequest); i {
case 0:
return &v.state
case 1:
@@ -963,7 +1092,7 @@ func file_control_proto_init() {
}
}
file_control_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AssignmentFact); i {
switch v := v.(*ReplicaDescriptor); i {
case 0:
return &v.state
case 1:
@@ -975,7 +1104,7 @@ func file_control_proto_init() {
}
}
file_control_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StatusRequest); i {
switch v := v.(*AssignmentFact); i {
case 0:
return &v.state
case 1:
@@ -987,6 +1116,18 @@ func file_control_proto_init() {
}
}
file_control_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StatusRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_control_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StatusResponse); i {
case 0:
return &v.state
@@ -1005,7 +1146,7 @@ func file_control_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_control_proto_rawDesc,
NumEnums: 0,
NumMessages: 8,
NumMessages: 9,
NumExtensions: 0,
NumServices: 3,
},
@@ -85,6 +85,21 @@ message HeartbeatSlot {
bool withdrawn = 8;
uint64 evidence_score = 9;
uint32 local_role_claim = 10; // authority.LocalRoleClaim enum value
repeated FrontendTarget frontends = 11;
}
// FrontendTarget — read-only frontend publication fact reported by
// a blockvolume process. This is an observation/status fact only:
// CSI may consume it to publish an already-running target, but
// master/authority MUST NOT treat it as an assignment, readiness, or
// placement input.
message FrontendTarget {
string protocol = 1; // "iscsi" | "nvme"
string addr = 2;
string iqn = 3;
string nqn = 4;
uint32 lun = 5;
uint32 nsid = 6;
}
message HeartbeatAck {
@@ -163,4 +178,5 @@ message StatusResponse {
bool assigned = 5;
string last_unsupported_reason = 6;
string last_convergence_stuck_at = 7;
repeated FrontendTarget frontends = 8;
}