Skip to content

Commit 35eff67

Browse files
committed
disable for self-hosters
1 parent 5cc6840 commit 35eff67

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

apps/supervisor/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ class ManagedSupervisor {
120120
snapshotPollIntervalSeconds: env.RUNNER_SNAPSHOT_POLL_INTERVAL_SECONDS,
121121
additionalEnvVars: env.RUNNER_ADDITIONAL_ENV_VARS,
122122
dockerAutoremove: env.DOCKER_AUTOREMOVE_EXITED_CONTAINERS,
123+
checkpointsEnabled: !!env.TRIGGER_CHECKPOINT_URL,
123124
} satisfies WorkloadManagerOptions;
124125

125126
this.resourceMonitor = env.RESOURCE_MONITOR_ENABLED

apps/supervisor/src/workloadManager/kubernetes.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,13 @@ export class KubernetesWorkloadManager implements WorkloadManager {
110110

111111
try {
112112
const basePodSpec = this.addPlacementTags(this.#defaultPodSpec, opts.placementTags);
113-
const podSpec = runtimeRequiresSeccompProfile(opts.runtime)
114-
? withBlockIoUringSeccompProfile(basePodSpec)
115-
: basePodSpec;
113+
// The io_uring-blocking profile is only needed to keep pods checkpointable.
114+
// Skip it unless checkpointing is enabled - self-hosters don't have the
115+
// profile provisioned on their nodes, so applying it would fail pod creation.
116+
const podSpec =
117+
this.opts.checkpointsEnabled && runtimeRequiresSeccompProfile(opts.runtime)
118+
? withBlockIoUringSeccompProfile(basePodSpec)
119+
: basePodSpec;
116120

117121
await this.k8s.core.createNamespacedPod({
118122
namespace: this.namespace,

apps/supervisor/src/workloadManager/types.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ export interface WorkloadManagerOptions {
1616
snapshotPollIntervalSeconds?: number;
1717
additionalEnvVars?: Record<string, string>;
1818
dockerAutoremove?: boolean;
19+
// Whether CRIU checkpoint/restore is enabled for this deployment. Only when
20+
// checkpointing is enabled do node-24+ pods need the io_uring-blocking seccomp
21+
// profile (io_uring FDs can't be checkpointed). Self-hosters without
22+
// checkpointing don't need it - and don't have the profile on their nodes.
23+
checkpointsEnabled?: boolean;
1924
}
2025

2126
export interface WorkloadManager {

0 commit comments

Comments
 (0)