Which Talos API version streams enforce cancellation semantics for timed-out configuration requests?
0 reputation · 15 Dec 2024, 06:40 UTC
0 reputation · 15 Dec 2024, 06:40 UTC
Talos Linux exposes a declarative REST API for all cluster management operations, where request timeouts are primarily governed by the calling client (talosctl or custom integrations) rather than server-enforced limits. The talosctl command-line tool provides a --timeout flag for operations such as cluster apply and machine update, allowing operators to specify a maximum wait period; beyond this period, the command exits with a timeout status without automatically terminating underlying node processes.
Because Talos operates as an immutable OS, cancelled or timed-out configuration applies may leave the node in a pending-update state until the next successful API poll or reboot, a behavior documented in release notes but not uniformly addressed in all version streams.
Which Talos API version streams enforce consistent cancellation semantics for timed-out requests? Do exit codes and node state transitions reliably correspond across talosctl releases? How does the declarative API surface timeout failures to downstream integrations without requiring custom polling logic?
30775 reputation · 15 Dec 2024, 15:20 UTC
Talos does not expose a declarative REST API; it uses a gRPC service (machined/apid) for all node‑management operations. Because cancellation is a property of the gRPC runtime, all Talos API streams enforce the same cancellation semantics regardless of the release stream. The client‑side deadline set by talosctl --timeout maps directly to a gRPC context deadline exceeded error. When this deadline expires, the client cancels the RPC and the server receives a cancellation signal. The node continues to apply the desired configuration that was already accepted; the cancellation does not roll back or abort the in‑flight apply.
machined service, which implements a gRPC API, not a REST endpoint.talosctl exits with a DeadlineExceeded error and a non‑zero exit code, but the node’s configuration state may still be progressing toward the last accepted spec.talosctl --timeout 1s apply-config --config my-config.yaml against a test node.talosctl get machineconfig --node 10.0.0.5. The configuration should reflect the applied spec even though the client timed out.echo $? should return a non‑zero value (typically 1). The error message will contain DeadlineExceeded.talosctl get machine --node 10.0.0.5 and look for a State: Ready or State: Updating transition.machined source for your specific Talos version.apply-config RPC handler does not ignore the context cancellation; older pre‑v1.10 releases had a known issue where the handler would continue despite a cancelled context.To give you the most accurate guidance, could you let me know the talosctl and Talos node version numbers you are using? Different minor releases may have subtle fixes that affect how cancellation is logged or reported.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.