mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 11:07:31 +01:00
cli: clarify logical holder and sealed generation fields
This commit is contained in:
1 parent
87b92007dd
commit
dd6fd3c2bb
3 files changed
+6
-4
No files matched your search
@@ -267,7 +267,7 @@ func chunkDetach(args []string, stdout, stderr io.Writer) int {
|
||||
fs.StringVar(&volumeID, "volume", "", "volume id")
|
||||
fs.StringVar(&statusAddr, "status-addr", "", "blockvolume status address or URL (with --chunk-control-endpoint)")
|
||||
fs.DurationVar(&timeout, "timeout", 120*time.Second, "operation bound (capped at the server's OpDeadline)")
|
||||
fs.BoolVar(&plain, "plain", false, "seal an idle volume without pre-copy; prints sealed HEAD generation on stderr")
|
||||
fs.BoolVar(&plain, "plain", false, "seal an idle volume without pre-copy; prints JSON headGen as sealed HEAD generation on stderr")
|
||||
fs.BoolVar(&frozen, "frozen", false, "not supported in this release: the server refuses a frozen detach (frozen_detach_unsupported)")
|
||||
fs.Int64Var(&freezeStartedAtNs, "freeze-started-at-ns", 0, "not supported in this release; only valid with --frozen")
|
||||
fs.BoolVar(&allowOverBudget, "allow-over-budget", false, "not supported in this release; only valid with --frozen")
|
||||
|
||||
@@ -49,7 +49,7 @@ func printWorkspaceView(out io.Writer, volume string, view *control.WorkspaceSta
|
||||
fmt.Fprintf(out, "volume: %s (query snapshot, not authority to serve)\n", volume)
|
||||
lease := view.GetLease()
|
||||
if lease == nil {
|
||||
fmt.Fprintln(out, "holder: none\nlease state: none")
|
||||
fmt.Fprintln(out, "replica: none\nepoch: none\nlease state: none\nholder: none")
|
||||
} else {
|
||||
state := "granted"
|
||||
if lease.GetValidForNs() <= 0 {
|
||||
@@ -57,7 +57,7 @@ func printWorkspaceView(out io.Writer, volume string, view *control.WorkspaceSta
|
||||
} else if lease.GetRevoking() {
|
||||
state = "revoking"
|
||||
}
|
||||
fmt.Fprintf(out, "holder: %s@%d (logical replica; server not provided by lease view)\nlease state: %s\nlease expiry_ns: %d; host validity_ns at query: %d\n", lease.GetReplicaId(), lease.GetEpoch(), state, lease.GetExpiresAtNs(), lease.GetValidForNs())
|
||||
fmt.Fprintf(out, "replica: %s\nepoch: %d\nlease state: %s\nholder: %s@%d (logical replica)\nlease expiry_ns: %d; host validity_ns at query: %d\n", lease.GetReplicaId(), lease.GetEpoch(), state, lease.GetReplicaId(), lease.GetEpoch(), lease.GetExpiresAtNs(), lease.GetValidForNs())
|
||||
}
|
||||
ack := view.GetRevocationAck()
|
||||
if ack == nil {
|
||||
@@ -66,6 +66,7 @@ func printWorkspaceView(out io.Writer, volume string, view *control.WorkspaceSta
|
||||
id := ack.GetIdentity()
|
||||
fmt.Fprintf(out, "recorded ACK: %s@%d HEAD generation %d\n", id.GetReplicaId(), id.GetEpoch(), ack.GetHeadGen())
|
||||
}
|
||||
fmt.Fprintln(out, "host: unknown (not recorded by the master); issued moves and bindings below are separate facts")
|
||||
for _, g := range view.GetMoves() {
|
||||
fmt.Fprintf(out, "move: request=%s kind=%s issued=%t %s/%s@%d -> %s/%s@%d HEAD generation %d remote LSN %d\n", g.GetRequestId(), g.GetKind(), g.GetIssued(), g.GetOldHost(), g.GetOldReplicaId(), g.GetOldEpoch(), g.GetNewHost(), g.GetNewReplicaId(), g.GetNewEpoch(), g.GetHeadGen(), g.GetRemoteLsn())
|
||||
}
|
||||
|
||||
@@ -317,7 +317,8 @@ Perform a clean hand-over in this order:
|
||||
|
||||
Busy admission refuses the operation. Do not proceed on any failure or
|
||||
unknown outcome. JSON remains on stdout; a successful command also prints
|
||||
`sealed HEAD generation: G` on its own stderr line. Copy the positive `G`.
|
||||
`sealed HEAD generation: G` on its own stderr line, taken from the same
|
||||
JSON `headGen` field on stdout. Copy the positive `G`.
|
||||
3. Request revocation using that seal and the identity from `show`:
|
||||
|
||||
```bash
|
||||
|
||||
Reference in new issue
Block a user