pub enum ClusterError {
Show 14 variants
ClusterIdentityMismatch {
persisted: ClusterId,
requested: ClusterId,
},
UnsupportedFormatVersion {
file: &'static str,
found: u32,
min: u32,
max: u32,
},
CorruptMetadata {
file: &'static str,
detail: String,
},
Io(Error),
Rng(String),
Unsupported(&'static str),
InvalidTrustMaterial(&'static str),
InvalidInvite(&'static str),
AlreadyBootstrapped {
cluster_id: ClusterId,
},
NotInitialized,
BootstrapInProgress(PathBuf),
NodeNotFound {
node: NodeId,
},
InvalidNodeStateTransition {
node: NodeId,
from: NodeState,
to: NodeState,
},
InvalidConfirmationToken,
}Expand description
The one error type of the cluster bootstrap surface.
Variants§
ClusterIdentityMismatch
A persisted identity binds this node to a different cluster than the
bootstrap/join being attempted (S2A-001). Only
wipe_identity resets the binding.
Fields
UnsupportedFormatVersion
A durable metadata file carries a format version outside the supported range (spec section 4.10: fail closed).
Fields
CorruptMetadata
A durable metadata file failed structural verification: undecodable payload, unknown fields, or a reserved all-zero identifier.
Fields
Io(Error)
Cluster metadata I/O failed.
Rng(String)
The caller-supplied CSPRNG failed.
Unsupported(&'static str)
The operation is deliberately not implemented yet; fails closed.
InvalidTrustMaterial(&'static str)
Caller-supplied trust material failed validation.
InvalidInvite(&'static str)
A cluster join invite failed validation.
AlreadyBootstrapped
The node is already bootstrapped; re-running init/join is rejected.
NotInitialized
No bootstrap record exists in this directory yet.
BootstrapInProgress(PathBuf)
Another bootstrap workflow holds the bootstrap lock file.
Recovery (review N7): if no bootstrap is running, remove the
stale cluster-meta/bootstrap.lock (content is pid + timestamp for
diagnosis) and retry cluster init / join / drain.
NodeNotFound
The target node is absent from the local membership record.
InvalidNodeStateTransition
The requested node state transition is not permitted.
Fields
InvalidConfirmationToken
node remove was attempted without the matching confirmation token.
Trait Implementations§
Source§impl Debug for ClusterError
impl Debug for ClusterError
Source§impl Display for ClusterError
impl Display for ClusterError
Source§impl Error for ClusterError
impl Error for ClusterError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ClusterError> for ClusterBackupError
impl From<ClusterError> for ClusterBackupError
Source§fn from(source: ClusterError) -> Self
fn from(source: ClusterError) -> Self
Source§impl From<ClusterError> for RuntimeError
impl From<ClusterError> for RuntimeError
Source§fn from(source: ClusterError) -> Self
fn from(source: ClusterError) -> Self
Source§impl From<ClusterError> for TabletError
impl From<ClusterError> for TabletError
Source§fn from(source: ClusterError) -> Self
fn from(source: ClusterError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for ClusterError
impl !UnwindSafe for ClusterError
impl Freeze for ClusterError
impl Send for ClusterError
impl Sync for ClusterError
impl Unpin for ClusterError
impl UnsafeUnpin for ClusterError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request