mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +01:00
fix: keep delete refusal guidance to verified revocation steps
This commit is contained in:
1 parent
aa4cc46549
commit
9bd8cb5bc6
2 files changed
+2
-2
No files matched your search
@@ -144,7 +144,7 @@ func (p *Publisher) RecordWorkspaceDeletion(ctx context.Context, volume string,
|
||||
}
|
||||
if _, line, ok := p.workspaceLineLocked(volume); ok {
|
||||
if s == nil || s.Ack == nil || s.Ack.Epoch != line.info.Epoch || s.Ack.ReplicaID != line.info.ReplicaID {
|
||||
return fmt.Errorf("workspace delete: live authority requires clean revocation ACK: revoke the line with its sealed generation (sw-block ops workspace revoke --epoch E --sealed-gen G) and wait for the recorded ACK, then delete; if the process was stopped by a signal, start it again first")
|
||||
return fmt.Errorf("workspace delete: live authority requires clean revocation ACK: revoke the line with its sealed generation (sw-block ops workspace revoke --epoch E --sealed-gen G) and wait for the recorded ACK, then delete")
|
||||
}
|
||||
} else if pendingPlacement {
|
||||
return fmt.Errorf("workspace delete: placement may have queued authority")
|
||||
|
||||
@@ -56,7 +56,7 @@ func TestMarkVolumeDeleting_RefusedWhileAssigned(t *testing.T) {
|
||||
if status.Code(err) != codes.FailedPrecondition {
|
||||
t.Fatalf("mark of an assigned volume: %v; want FailedPrecondition", err)
|
||||
}
|
||||
want := "revoke the line with its sealed generation (sw-block ops workspace revoke --epoch E --sealed-gen G) and wait for the recorded ACK, then delete; if the process was stopped by a signal, start it again first"
|
||||
want := "revoke the line with its sealed generation (sw-block ops workspace revoke --epoch E --sealed-gen G) and wait for the recorded ACK, then delete"
|
||||
if !strings.Contains(status.Convert(err).Message(), want) {
|
||||
t.Fatalf("delete refusal lacks the clean-revocation cure: %v", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user