mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +01:00
feat: an identity refusal waits visibly instead of exiting 75
The master refuses an unregistered server id or a wrong host with a typed IDENTITY detail (kind unregistered or wrong_host) on the lease renewal and the assignment stream, text unchanged. The volume treats it like refused credentials: no bound, /status reason "identity refused: <kind>" with its age, never serves; it ends when an identity-checked call (renewal, delivered assignment) is accepted, not on a heartbeat. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
04c07de5ac
commit
450bce4d9e
10 files changed
+214
-20
No files matched your search
@@ -467,3 +467,37 @@ func (p *masterProxy) restore() {
|
||||
}
|
||||
p.serve(ln)
|
||||
}
|
||||
|
||||
// A volume process whose server id is not registered (a misconfigured unit,
|
||||
// or a clone) never serves and never exits 75: the master refuses it with the
|
||||
// typed IDENTITY detail, and it waits visibly, /status MasterWait reason
|
||||
// "identity refused: unregistered", until its registration is fixed. A
|
||||
// restart cannot fix a registration, so a 75 loop would only burn the start
|
||||
// limit. SIGTERM still ends it at once.
|
||||
func TestUnregisteredServerWaitsVisibly(t *testing.T) {
|
||||
env := startHandoffEnv(t, 1)
|
||||
b := env.hosts["s1"]
|
||||
args := env.volArgs("s1")
|
||||
for i := range args {
|
||||
if args[i] == "--server-id" {
|
||||
args[i+1] = "s-unregistered"
|
||||
}
|
||||
}
|
||||
d := env.h.start(t, "bv-unregistered", env.h.volume, args...)
|
||||
poll(t, 30*time.Second, "/status never showed the identity refusal", func() bool {
|
||||
mw, ok := masterWaitOf(b.status)
|
||||
return ok && mw.Reason == "identity refused: unregistered" && mw.Until.IsZero()
|
||||
})
|
||||
time.Sleep(45 * time.Second) // past the 30 s bound a reachable master would give
|
||||
stillRunning(t, d, "45 s refused as unregistered")
|
||||
if volumeFrontendReady(b.status, "v1") {
|
||||
t.Fatal("an unregistered server served")
|
||||
}
|
||||
if mw, ok := masterWaitOf(b.status); !ok || mw.Reason != "identity refused: unregistered" || time.Since(mw.Since) < 40*time.Second {
|
||||
t.Fatalf("/status MasterWait %+v (present %v); want identity refused for 40 s or more", mw, ok)
|
||||
}
|
||||
d.term(t, 10*time.Second)
|
||||
if d.err != nil {
|
||||
t.Fatalf("exit %v after SIGTERM; want status 0", d.err)
|
||||
}
|
||||
}
|
||||
@@ -2,13 +2,16 @@ package master
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
"strings"
|
||||
|
||||
"github.com/seaweedfs/seaweed-block/core/authority"
|
||||
"github.com/seaweedfs/seaweed-block/core/rpc/control"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/peer"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// addrHost is the host part of a host:port (or bare host) address.
|
||||
@@ -80,12 +83,12 @@ func (h *Host) refuseWorkspaceHolderHost(ctx context.Context, rpc, server string
|
||||
var err error
|
||||
switch ph := peerHost(ctx); {
|
||||
case !ok:
|
||||
err = fmt.Errorf("%s: server id %q is not registered; a workspace holder's server id must be", rpc, server)
|
||||
err = &holderIdentityError{Kind: "unregistered", msg: fmt.Sprintf("%s: server id %q is not registered; a workspace holder's server id must be", rpc, server)}
|
||||
case ph == "" || !hosts[ph]:
|
||||
if ph == "" {
|
||||
ph = "an unknown peer"
|
||||
}
|
||||
err = fmt.Errorf("%s: server id %s is registered on host %s but connects from %s: register the node by the address it connects from (not loopback) in the cluster spec", rpc, server, named, ph)
|
||||
err = &holderIdentityError{Kind: "wrong_host", msg: fmt.Sprintf("%s: server id %s is registered on host %s but connects from %s: register the node by the address it connects from (not loopback) in the cluster spec", rpc, server, named, ph)}
|
||||
}
|
||||
if err != nil {
|
||||
h.log.Print(err)
|
||||
@@ -93,6 +96,30 @@ func (h *Host) refuseWorkspaceHolderHost(ctx context.Context, rpc, server string
|
||||
return err
|
||||
}
|
||||
|
||||
// holderIdentityError is refuseWorkspaceHolderHost's refusal; Kind is
|
||||
// "unregistered" or "wrong_host".
|
||||
type holderIdentityError struct {
|
||||
Kind string
|
||||
msg string
|
||||
}
|
||||
|
||||
func (e *holderIdentityError) Error() string { return e.msg }
|
||||
|
||||
// identityRefusal is the FailedPrecondition status for a holder identity
|
||||
// refusal, with the IDENTITY detail and its kind (text unchanged); any
|
||||
// other error is a plain FailedPrecondition.
|
||||
func identityRefusal(err error) error {
|
||||
var id *holderIdentityError
|
||||
if !errors.As(err, &id) {
|
||||
return status.Error(codes.FailedPrecondition, err.Error())
|
||||
}
|
||||
st := status.New(codes.FailedPrecondition, err.Error())
|
||||
if d, e := st.WithDetails(&control.WorkspaceLeaseRefusal{Kind: control.WorkspaceLeaseRefusal_IDENTITY, Identity: id.Kind}); e == nil {
|
||||
st = d
|
||||
}
|
||||
return st.Err()
|
||||
}
|
||||
|
||||
// holderSlotFact is the slot fact of replica on the server the authority line names (workspaceSourceHost); a
|
||||
// same-replica claim from any other server, however fresh, is never used (INV-AUTH-HOLDER-IDENTITY-001).
|
||||
// No resolvable holder: no fact (fail closed).
|
||||
|
||||
@@ -395,7 +395,7 @@ func (s *services) SubscribeAssignments(req *control.SubscribeRequest, stream co
|
||||
// from its registered host, so a second host with a copied --server-id never receives (never adopts) it.
|
||||
if s.isWorkspaceVolume(req.VolumeId) {
|
||||
if err := s.host.refuseWorkspaceHolderHost(ctx, "assignment stream", req.GetServerId()); err != nil {
|
||||
return status.Error(codes.FailedPrecondition, err.Error())
|
||||
return identityRefusal(err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -201,3 +201,44 @@ func TestRenewalReplicaMismatchAtOlderLineEpochIsOther(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// A holder whose server id is not registered is refused with the typed
|
||||
// IDENTITY detail (kind unregistered), on the lease renewal and on the
|
||||
// assignment stream, text unchanged; the volume waits on it like refused
|
||||
// credentials instead of exiting 75.
|
||||
func TestIdentityRefusalIsTyped(t *testing.T) {
|
||||
h, conn, _ := reviewBindingHostBeforeStart(t, func(context.Context, string) (authority.WorkspaceHead, error) {
|
||||
return authority.WorkspaceHead{Gen: 1, Epoch: 1, Holder: "node-a/r1", Detached: true}, nil
|
||||
}, nil)
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
|
||||
t.Cleanup(cancel)
|
||||
reviewCreate(t, conn, ctx, "v")
|
||||
ws := control.NewWorkspaceServiceClient(conn)
|
||||
b := &control.WorkspaceBinding{VolumeId: "v", ServerId: "node-a", DataAddr: "127.0.0.1:10000", CtrlAddr: "127.0.0.1:10001"}
|
||||
if _, err := ws.RegisterWorkspaceBinding(ctx, b); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, err := ws.PlaceWorkspace(ctx, &control.WorkspacePlacement{VolumeId: "v", ServerId: "node-a", ReplicaId: "r1"}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
reviewHeartbeat(t, conn, ctx, "v", "node-a", b.DataAddr, b.CtrlAddr)
|
||||
if _, err := h.RunLifecycleProductTick(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
line := waitAuthorityLine(t, h.Publisher(), "v")
|
||||
check := func(rpc string, err error) {
|
||||
t.Helper()
|
||||
text, r := refusalOf(t, rpc, err)
|
||||
if r == nil || r.GetKind() != control.WorkspaceLeaseRefusal_IDENTITY || r.GetIdentity() != "unregistered" ||
|
||||
!strings.Contains(text, `server id "node-x" is not registered`) {
|
||||
t.Fatalf("%s from an unregistered server: %q detail %v; want IDENTITY unregistered, text unchanged", rpc, text, r)
|
||||
}
|
||||
}
|
||||
_, err := ws.RenewWorkspaceLease(ctx, &control.WorkspaceIdentity{VolumeId: "v", ReplicaId: "r1", Epoch: line.Epoch, ServerId: "node-x"})
|
||||
check("renewal", err)
|
||||
stream, err := control.NewAssignmentServiceClient(conn).SubscribeAssignments(ctx, &control.SubscribeRequest{VolumeId: "v", ReplicaId: "r1", ServerId: "node-x"})
|
||||
if err == nil {
|
||||
_, err = stream.Recv()
|
||||
}
|
||||
check("assignment stream", err)
|
||||
}
|
||||
@@ -146,7 +146,7 @@ func (s *services) RenewWorkspaceLease(ctx context.Context, q *control.Workspace
|
||||
return nil, err
|
||||
}
|
||||
if ok, err := s.holderMatches(ctx, q.GetVolumeId(), q.GetReplicaId(), q.GetServerId(), q.GetEpoch()); err != nil {
|
||||
return nil, status.Error(codes.FailedPrecondition, err.Error())
|
||||
return nil, identityRefusal(err)
|
||||
} else if !ok {
|
||||
const text = "workspace lease: server identity does not match the current holder"
|
||||
if s.renewalMoved(q.GetVolumeId(), q.GetReplicaId(), q.GetServerId(), q.GetEpoch()) {
|
||||
|
||||
@@ -782,6 +782,9 @@ func (h *Host) streamOnce(ctx context.Context) error {
|
||||
fact, err := stream.Recv()
|
||||
if ctx.Err() == nil && err != io.EOF {
|
||||
h.mw.call(err) // a delivered fact or a handler's status is contact
|
||||
if err == nil {
|
||||
h.mw.identityAccepted() // the stream checks the holder's identity
|
||||
}
|
||||
}
|
||||
if err == io.EOF {
|
||||
return nil
|
||||
|
||||
@@ -41,6 +41,8 @@ type masterWait struct {
|
||||
last time.Time // the latest reply
|
||||
down time.Time // first failure without a reply since the last contact
|
||||
creds time.Time // first credentials refusal since the last accepted call
|
||||
ident time.Time // first identity refusal since the last accepted call
|
||||
identOf string // its kind: unregistered or wrong_host
|
||||
barrier time.Time // T: request start + retry_after of the latest BARRIER refusal
|
||||
final string // "moved" or "deleted": a permanent refusal
|
||||
logged string // the reason last logged
|
||||
@@ -78,12 +80,30 @@ func masterCallClass(err error) (contact, credentials bool) {
|
||||
return true, false
|
||||
}
|
||||
|
||||
// call records one call's result.
|
||||
// call records one call's result. An identity refusal (the master's typed
|
||||
// IDENTITY detail: this server id is not registered, or calls from another
|
||||
// host) is not contact: like refused credentials it has no bound, because a
|
||||
// restart cannot fix a registration. It lasts until an identity-checked call
|
||||
// (a lease renewal, an assignment delivered) is accepted: the heartbeat does
|
||||
// not check identity, so its answers do not end it.
|
||||
func (w *masterWait) call(err error) {
|
||||
contact, credentials := masterCallClass(err)
|
||||
identity := ""
|
||||
if r := leaseRefusalDetail(err); r != nil && r.GetKind() == control.WorkspaceLeaseRefusal_IDENTITY {
|
||||
contact, identity = false, r.GetIdentity()
|
||||
if identity == "" {
|
||||
identity = "unknown"
|
||||
}
|
||||
}
|
||||
w.mu.Lock()
|
||||
now := w.now()
|
||||
switch {
|
||||
case identity != "":
|
||||
w.down, w.creds = time.Time{}, time.Time{}
|
||||
if w.ident.IsZero() {
|
||||
w.ident = now
|
||||
}
|
||||
w.identOf = identity
|
||||
case contact:
|
||||
if w.contact.IsZero() {
|
||||
w.contact = now
|
||||
@@ -91,12 +111,12 @@ func (w *masterWait) call(err error) {
|
||||
w.last = now
|
||||
w.down, w.creds = time.Time{}, time.Time{}
|
||||
case credentials:
|
||||
w.contact, w.down = time.Time{}, time.Time{}
|
||||
w.contact, w.down, w.ident = time.Time{}, time.Time{}, time.Time{}
|
||||
if w.creds.IsZero() {
|
||||
w.creds = now
|
||||
}
|
||||
default:
|
||||
w.contact, w.creds = time.Time{}, time.Time{}
|
||||
w.contact, w.creds, w.ident = time.Time{}, time.Time{}, time.Time{}
|
||||
if w.down.IsZero() {
|
||||
w.down = now
|
||||
}
|
||||
@@ -104,10 +124,21 @@ func (w *masterWait) call(err error) {
|
||||
w.mu.Unlock()
|
||||
}
|
||||
|
||||
// identityAccepted ends an identity refusal: an identity-checked call (a
|
||||
// lease renewal, an assignment delivered) was accepted.
|
||||
func (w *masterWait) identityAccepted() {
|
||||
w.mu.Lock()
|
||||
w.ident, w.identOf = time.Time{}, ""
|
||||
w.mu.Unlock()
|
||||
}
|
||||
|
||||
// renewal records a lease renewal started at start: the call itself, and
|
||||
// the typed kind of a refusal (status detail only, never its text).
|
||||
func (w *masterWait) renewal(start time.Time, err error) {
|
||||
w.call(err)
|
||||
if err == nil {
|
||||
w.identityAccepted()
|
||||
}
|
||||
r := leaseRefusalDetail(err)
|
||||
if r == nil {
|
||||
return
|
||||
@@ -144,7 +175,7 @@ func leaseRefusalDetail(err error) *control.WorkspaceLeaseRefusal {
|
||||
// deadlineLocked is max(contact streak start, barrier T) + MasterWaitLimit,
|
||||
// or zero while there is no contact (no bound). Caller holds mu.
|
||||
func (w *masterWait) deadlineLocked() time.Time {
|
||||
if w.contact.IsZero() {
|
||||
if w.contact.IsZero() || !w.ident.IsZero() {
|
||||
return time.Time{}
|
||||
}
|
||||
from := w.contact
|
||||
@@ -173,6 +204,8 @@ func (w *masterWait) snapshot(assigned bool) MasterWait {
|
||||
out = MasterWait{Reason: w.final, Since: now}
|
||||
case !w.creds.IsZero():
|
||||
out = MasterWait{Reason: "credentials", Since: w.creds}
|
||||
case !w.ident.IsZero():
|
||||
out = MasterWait{Reason: "identity refused: " + w.identOf, Since: w.ident}
|
||||
case w.contact.IsZero():
|
||||
out = MasterWait{Reason: "unreachable", Since: w.down}
|
||||
if w.down.IsZero() {
|
||||
@@ -235,5 +268,8 @@ func (h *Host) MasterWaitContact() (streakStart, lastReply, barrier time.Time, f
|
||||
w := h.mw
|
||||
w.mu.Lock()
|
||||
defer w.mu.Unlock()
|
||||
if !w.ident.IsZero() {
|
||||
return time.Time{}, w.last, w.barrier, w.final // no bound while identity is refused
|
||||
}
|
||||
return w.contact, w.last, w.barrier, w.final
|
||||
}
|
||||
@@ -284,3 +284,36 @@ func TestFlappingMasterNeverExpiresEarly(t *testing.T) {
|
||||
now = now.Add(10 * time.Second)
|
||||
}
|
||||
}
|
||||
|
||||
// An identity refusal (typed IDENTITY detail) waits like refused credentials:
|
||||
// no bound, reason "identity refused: <kind>" with its age; the first
|
||||
// accepted reply ends it.
|
||||
func TestIdentityRefusalWaitsVisibly(t *testing.T) {
|
||||
now := time.Unix(1_800_000_000, 0)
|
||||
w := newMasterWait(func() time.Time { return now }, func(string, ...any) {})
|
||||
st, err := status.New(codes.FailedPrecondition, `workspace lease: server id "s9" is not registered`).
|
||||
WithDetails(&control.WorkspaceLeaseRefusal{Kind: control.WorkspaceLeaseRefusal_IDENTITY, Identity: "unregistered"})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
w.call(nil) // the heartbeat is answered first
|
||||
since := now
|
||||
for i := 0; i < 600; i++ { // 20 min of refused renewals and streams
|
||||
w.renewal(now, st.Err())
|
||||
now = now.Add(2 * time.Second)
|
||||
}
|
||||
if d, final := w.state(); !d.IsZero() || final != "" {
|
||||
t.Fatalf("after 20 min of identity refusals: bound %v final %q; want none", d, final)
|
||||
}
|
||||
if s := w.snapshot(true); s.Reason != "identity refused: unregistered" || !s.Since.Equal(since) || !s.Until.IsZero() {
|
||||
t.Fatalf("status %+v; want identity refused: unregistered since the first refusal, no bound", s)
|
||||
}
|
||||
w.call(nil) // a heartbeat answer does not check identity: still refused
|
||||
if s := w.snapshot(true); s.Reason != "identity refused: unregistered" {
|
||||
t.Fatalf("status %+v after a heartbeat answer; want the identity wait to go on", s)
|
||||
}
|
||||
w.renewal(now, nil) // registered now: the renewal passes
|
||||
if s := w.snapshot(true); s.Reason == "identity refused: unregistered" {
|
||||
t.Fatalf("status %+v after an accepted call; want the identity wait over", s)
|
||||
}
|
||||
}
|
||||
@@ -24,10 +24,11 @@ const (
|
||||
type WorkspaceLeaseRefusal_Kind int32
|
||||
|
||||
const (
|
||||
WorkspaceLeaseRefusal_OTHER WorkspaceLeaseRefusal_Kind = 0
|
||||
WorkspaceLeaseRefusal_BARRIER WorkspaceLeaseRefusal_Kind = 1
|
||||
WorkspaceLeaseRefusal_MOVED WorkspaceLeaseRefusal_Kind = 2
|
||||
WorkspaceLeaseRefusal_DELETED WorkspaceLeaseRefusal_Kind = 3
|
||||
WorkspaceLeaseRefusal_OTHER WorkspaceLeaseRefusal_Kind = 0
|
||||
WorkspaceLeaseRefusal_BARRIER WorkspaceLeaseRefusal_Kind = 1
|
||||
WorkspaceLeaseRefusal_MOVED WorkspaceLeaseRefusal_Kind = 2
|
||||
WorkspaceLeaseRefusal_DELETED WorkspaceLeaseRefusal_Kind = 3
|
||||
WorkspaceLeaseRefusal_IDENTITY WorkspaceLeaseRefusal_Kind = 4
|
||||
)
|
||||
|
||||
// Enum value maps for WorkspaceLeaseRefusal_Kind.
|
||||
@@ -37,12 +38,14 @@ var (
|
||||
1: "BARRIER",
|
||||
2: "MOVED",
|
||||
3: "DELETED",
|
||||
4: "IDENTITY",
|
||||
}
|
||||
WorkspaceLeaseRefusal_Kind_value = map[string]int32{
|
||||
"OTHER": 0,
|
||||
"BARRIER": 1,
|
||||
"MOVED": 2,
|
||||
"DELETED": 3,
|
||||
"OTHER": 0,
|
||||
"BARRIER": 1,
|
||||
"MOVED": 2,
|
||||
"DELETED": 3,
|
||||
"IDENTITY": 4,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -309,10 +312,14 @@ func (x *WorkspaceLeaseFact) GetRevoking() bool {
|
||||
// detail (code and text unchanged). A refusal without it is OTHER. MOVED and
|
||||
// DELETED are set only on a permanent, known fact; every doubtful case is
|
||||
// OTHER. retry_after_ns (BARRIER only) is relative to the request's start.
|
||||
// IDENTITY (also on a SubscribeAssignments refusal): the caller's server id is
|
||||
// not registered, or it calls from another host than the registered one;
|
||||
// identity names which ("unregistered" or "wrong_host").
|
||||
type WorkspaceLeaseRefusal struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Kind WorkspaceLeaseRefusal_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=seaweedfs.block.control.WorkspaceLeaseRefusal_Kind" json:"kind,omitempty"`
|
||||
RetryAfterNs int64 `protobuf:"varint,2,opt,name=retry_after_ns,json=retryAfterNs,proto3" json:"retry_after_ns,omitempty"`
|
||||
Identity string `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -361,6 +368,13 @@ func (x *WorkspaceLeaseRefusal) GetRetryAfterNs() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WorkspaceLeaseRefusal) GetIdentity() string {
|
||||
if x != nil {
|
||||
return x.Identity
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type WorkspaceRevocationAck struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Identity *WorkspaceIdentity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"`
|
||||
@@ -1256,15 +1270,17 @@ const file_workspace_proto_rawDesc = "" +
|
||||
"\rexpires_at_ns\x18\x04 \x01(\x03R\vexpiresAtNs\x12 \n" +
|
||||
"\fvalid_for_ns\x18\x05 \x01(\x03R\n" +
|
||||
"validForNs\x12\x1a\n" +
|
||||
"\brevoking\x18\x06 \x01(\bR\brevoking\"\xbe\x01\n" +
|
||||
"\brevoking\x18\x06 \x01(\bR\brevoking\"\xe8\x01\n" +
|
||||
"\x15WorkspaceLeaseRefusal\x12G\n" +
|
||||
"\x04kind\x18\x01 \x01(\x0e23.seaweedfs.block.control.WorkspaceLeaseRefusal.KindR\x04kind\x12$\n" +
|
||||
"\x0eretry_after_ns\x18\x02 \x01(\x03R\fretryAfterNs\"6\n" +
|
||||
"\x0eretry_after_ns\x18\x02 \x01(\x03R\fretryAfterNs\x12\x1a\n" +
|
||||
"\bidentity\x18\x03 \x01(\tR\bidentity\"D\n" +
|
||||
"\x04Kind\x12\t\n" +
|
||||
"\x05OTHER\x10\x00\x12\v\n" +
|
||||
"\aBARRIER\x10\x01\x12\t\n" +
|
||||
"\x05MOVED\x10\x02\x12\v\n" +
|
||||
"\aDELETED\x10\x03\"{\n" +
|
||||
"\aDELETED\x10\x03\x12\f\n" +
|
||||
"\bIDENTITY\x10\x04\"{\n" +
|
||||
"\x16WorkspaceRevocationAck\x12F\n" +
|
||||
"\bidentity\x18\x01 \x01(\v2*.seaweedfs.block.control.WorkspaceIdentityR\bidentity\x12\x19\n" +
|
||||
"\bhead_gen\x18\x02 \x01(\x04R\aheadGen\"\xf6\x02\n" +
|
||||
|
||||
@@ -32,10 +32,14 @@ message WorkspaceLeaseFact {
|
||||
// detail (code and text unchanged). A refusal without it is OTHER. MOVED and
|
||||
// DELETED are set only on a permanent, known fact; every doubtful case is
|
||||
// OTHER. retry_after_ns (BARRIER only) is relative to the request's start.
|
||||
// IDENTITY (also on a SubscribeAssignments refusal): the caller's server id is
|
||||
// not registered, or it calls from another host than the registered one;
|
||||
// identity names which ("unregistered" or "wrong_host").
|
||||
message WorkspaceLeaseRefusal {
|
||||
enum Kind { OTHER = 0; BARRIER = 1; MOVED = 2; DELETED = 3; }
|
||||
enum Kind { OTHER = 0; BARRIER = 1; MOVED = 2; DELETED = 3; IDENTITY = 4; }
|
||||
Kind kind = 1;
|
||||
int64 retry_after_ns = 2;
|
||||
string identity = 3;
|
||||
}
|
||||
message WorkspaceRevocationAck { WorkspaceIdentity identity = 1; uint64 head_gen = 2; }
|
||||
message WorkspaceMove {
|
||||
|
||||
Reference in new issue
Block a user