Skip to main content

AgentError

Enum AgentError 

Source
pub enum AgentError {
Show 18 variants NotFound { container: String, reason: String, }, PullFailed { image: String, reason: String, }, CreateFailed { id: String, reason: String, }, StartFailed { id: String, reason: String, }, UnexpectedExit { id: String, code: i32, }, HealthCheckFailed { id: String, reason: String, }, InitActionFailed { id: String, reason: String, }, Timeout { timeout: Duration, }, DependencyTimeout { service: String, dependency: String, condition: String, timeout: Duration, }, InvalidSpec(String), Network(String), Configuration(String), Internal(String), Unsupported(String), WslGpuUnavailable { reason: String, }, GpuSharingUnavailable { mode: String, reason: String, }, RouteToPeer { service: String, required_os: String, reason: String, }, WrongPlatform { runtime: String, expected: String, actual: String, image: String, },
}
Expand description

Agent runtime errors

Variants§

§

NotFound

Container not found

Fields

§container: String
§reason: String
§

PullFailed

Failed to pull image

Fields

§image: String
§reason: String
§

CreateFailed

Failed to create container

Fields

§reason: String
§

StartFailed

Failed to start container

Fields

§reason: String
§

UnexpectedExit

Container exited unexpectedly

Fields

§code: i32
§

HealthCheckFailed

Health check failed

Fields

§reason: String
§

InitActionFailed

Init action failed

Fields

§reason: String
§

Timeout

Timeout

Fields

§timeout: Duration
§

DependencyTimeout

Dependency timeout - service waiting for dependency condition

Fields

§service: String
§dependency: String
§condition: String
§timeout: Duration
§

InvalidSpec(String)

Invalid spec

§

Network(String)

Network setup or operation failed

§

Configuration(String)

Configuration error (missing or invalid configuration)

§

Internal(String)

Internal runtime error

§

Unsupported(String)

Operation is not supported by this runtime

§

WslGpuUnavailable

GPU was requested by the service spec, but the underlying WSL2 host cannot deliver GPU access (typically because /dev/dxg is not exposed by the running WSL2 kernel, or the WSLg driver shim mount is missing).

Returned by the WSL2 delegate when wiring /dev/dxg and the WSLg lib mounts into the youki bundle. Silent CPU fallback would be surprising for users who explicitly asked for a GPU, so this is a hard error; callers must either downgrade the spec to drop resources.gpu or re-place the workload on a node whose WSL2 distro exposes the DirectX kernel interface.

Fields

§reason: String
§

GpuSharingUnavailable

GPU sharing was requested (MPS or time-slicing) but the host or runtime cannot satisfy the requested mode.

Typical causes:

  • mode = "mps" but the host MPS pipe / log directory does not exist (the nvidia-cuda-mps-control daemon is not running).
  • mode = "mps" combined with isolation: hyperv on Windows — MPS is not exposed inside the UVM kernel.

Silent fallback to exclusive-mode access would be surprising for users who explicitly opted in to sharing (they may be relying on sharing for capacity planning), so this is a hard error. Callers must either fix the host (start the MPS daemon, switch isolation) or drop the sharing field from the spec.

Fields

§mode: String

Sharing mode that could not be satisfied ("mps", "time-slice").

§reason: String

Human-readable explanation (e.g. “/tmp/nvidia-mps does not exist;
ensure nvidia-cuda-mps-control is running”).

§

RouteToPeer

The workload cannot run on this node and must be re-placed on a peer that can satisfy required_os.

Returned by crate::runtimes::composite::CompositeRuntime::select_for when a foreign-OS workload (today: Linux on a Windows node) lands on a node that has no suitable local runtime (e.g. no WSL2 delegate configured). The scheduler is expected to catch this and re-dispatch to a cluster peer whose NodeState.os matches required_os. When no capable peer exists the scheduler marks the service failed with an actionable message naming both remediations (enable the local WSL2 delegate, or add a Linux peer to the cluster).

This variant is not a container failure: the service manager must surface it to the scheduler and must not roll up CreateFailed on top of it, otherwise the rescheduling signal is lost.

Fields

§service: String

Service name that needs to be re-placed.

§required_os: String

OS the workload requires (OCI-canonical: linux / windows / darwin).

§reason: String

Human-readable explanation (e.g. “no WSL2 delegate configured on this Windows node”).

§

WrongPlatform

The local runtime cannot service this image because the image’s OS does not match the runtime’s expected OS.

Returned by the HCS runtime when an image’s OCI config reports os != "windows" (e.g. a Linux alpine image landing on a Windows host that also has a WSL2 delegate). Calling vmcompute.dll!ProcessBaseImage on a non-Windows base layer is guaranteed to fail with ERROR_PATH_NOT_FOUND (0x80070003) because the HCS API expects the Windows-specific Hives/ / UtilityVM/ / Files/Windows/System32/ layout. Bailing early with this variant lets the composite runtime treat the call as a soft skip (the delegate’s parallel pull is the one that actually owns the image) instead of failing the whole pull.

This is not a container failure: callers in the composite layer should distinguish this from a real PullFailed and continue with the delegate’s result.

Fields

§runtime: String

Identifier of the runtime that rejected the image (e.g. "hcs", "wsl2").

§expected: String

OCI-canonical OS this runtime expects (e.g. "windows", "linux").

§actual: String

OCI-canonical OS the image manifest reports.

§image: String

Image reference that triggered the mismatch.

Trait Implementations§

Source§

impl Debug for AgentError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for AgentError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for AgentError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<DependencyError> for AgentError

Source§

fn from(err: DependencyError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> OptionalSend for T
where T: Send + ?Sized,

Source§

impl<T> OptionalSync for T
where T: Sync + ?Sized,

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ServiceExt for T

Source§

fn propagate_header(self, header: HeaderName) -> PropagateHeader<Self>
where Self: Sized,

Propagate a header from the request to the response. Read more
Source§

fn add_extension<T>(self, value: T) -> AddExtension<Self, T>
where Self: Sized,

Add some shareable value to request extensions. Read more
Source§

fn map_request_body<F>(self, f: F) -> MapRequestBody<Self, F>
where Self: Sized,

Apply a transformation to the request body. Read more
Source§

fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>
where Self: Sized,

Apply a transformation to the response body. Read more
Source§

fn compression(self) -> Compression<Self>
where Self: Sized,

Compresses response bodies. Read more
Source§

fn decompression(self) -> Decompression<Self>
where Self: Sized,

Decompress response bodies. Read more
Source§

fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using HTTP status codes. Read more
Source§

fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using gRPC headers. Read more
Source§

fn follow_redirects(self) -> FollowRedirect<Self>
where Self: Sized,

Follow redirect resposes using the Standard policy. Read more
Source§

fn sensitive_headers( self, headers: impl IntoIterator<Item = HeaderName>, ) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>
where Self: Sized,

Mark headers as sensitive on both requests and responses. Read more
Source§

fn sensitive_request_headers( self, headers: impl IntoIterator<Item = HeaderName>, ) -> SetSensitiveRequestHeaders<Self>
where Self: Sized,

Mark headers as sensitive on requests. Read more
Source§

fn sensitive_response_headers( self, headers: impl IntoIterator<Item = HeaderName>, ) -> SetSensitiveResponseHeaders<Self>
where Self: Sized,

Mark headers as sensitive on responses. Read more
Source§

fn override_request_header<M>( self, header_name: HeaderName, make: M, ) -> SetRequestHeader<Self, M>
where Self: Sized,

Insert a header into the request. Read more
Source§

fn append_request_header<M>( self, header_name: HeaderName, make: M, ) -> SetRequestHeader<Self, M>
where Self: Sized,

Append a header into the request. Read more
Source§

fn insert_request_header_if_not_present<M>( self, header_name: HeaderName, make: M, ) -> SetRequestHeader<Self, M>
where Self: Sized,

Insert a header into the request, if the header is not already present. Read more
Source§

fn override_response_header<M>( self, header_name: HeaderName, make: M, ) -> SetResponseHeader<Self, M>
where Self: Sized,

Insert a header into the response. Read more
Source§

fn append_response_header<M>( self, header_name: HeaderName, make: M, ) -> SetResponseHeader<Self, M>
where Self: Sized,

Append a header into the response. Read more
Source§

fn insert_response_header_if_not_present<M>( self, header_name: HeaderName, make: M, ) -> SetResponseHeader<Self, M>
where Self: Sized,

Insert a header into the response, if the header is not already present. Read more
Source§

fn set_request_id<M>( self, header_name: HeaderName, make_request_id: M, ) -> SetRequestId<Self, M>
where Self: Sized, M: MakeRequestId,

Add request id header and extension. Read more
Source§

fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>
where Self: Sized, M: MakeRequestId,

Add request id header and extension, using x-request-id as the header name. Read more
Source§

fn propagate_request_id( self, header_name: HeaderName, ) -> PropagateRequestId<Self>
where Self: Sized,

Propgate request ids from requests to responses. Read more
Source§

fn propagate_x_request_id(self) -> PropagateRequestId<Self>
where Self: Sized,

Propgate request ids from requests to responses, using x-request-id as the header name. Read more
Source§

fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>
where Self: Sized,

Catch panics and convert them into 500 Internal Server responses. Read more
Source§

fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>
where Self: Sized,

Intercept requests with over-sized payloads and convert them into 413 Payload Too Large responses. Read more
Source§

fn trim_trailing_slash(self) -> NormalizePath<Self>
where Self: Sized,

Remove trailing slashes from paths. Read more
Source§

fn append_trailing_slash(self) -> NormalizePath<Self>
where Self: Sized,

Append trailing slash to paths. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> ToStringFallible for T
where T: Display,

Source§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> ValidateIp for T
where T: ToString,

Source§

fn validate_ipv4(&self) -> bool

Validates whether the given string is an IP V4
Source§

fn validate_ipv6(&self) -> bool

Validates whether the given string is an IP V6
Source§

fn validate_ip(&self) -> bool

Validates whether the given string is an IP
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more