diff --git a/.gitignore b/.gitignore index 15acf8294..f2a3fe8ea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,10 @@ .cache/ .bash_history /compute-domain-controller +/compute-domain-daemon /compute-domain-kubelet-plugin /gpu-kubelet-plugin +/webhook .idea [._]*.sw[a-p] coverage.out diff --git a/cmd/compute-domain-daemon/main.go b/cmd/compute-domain-daemon/main.go index 03e95c394..fdee03466 100644 --- a/cmd/compute-domain-daemon/main.go +++ b/cmd/compute-domain-daemon/main.go @@ -204,6 +204,14 @@ func newApp() *cli.App { // Run invokes the IMEX daemon and manages its lifecycle. func run(ctx context.Context, cancel context.CancelFunc, flags *Flags) error { + // Verify that CDI container edits were applied by the container runtime by + // checking for COMPUTE_DOMAIN_UUID, which is always injected as part of the + // CDI edits. If it is missing, CDI is likely disabled and the daemon cannot + // function correctly (e.g. the /imexd mount will be missing). + if flags.computeDomainUUID == "" { + return fmt.Errorf("CDI container edits did not apply -- is CDI enabled in your container runtime?") + } + common.StartDebugSignalHandlers() // Validate feature gate dependencies