﻿# Diagnose conflicting CDI device definitions across search directories

Inspect all discovered CDI definitions and the deployed registry implementation when one qualified name has multiple sources.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/guide-linux-cdi-duplicate-specs/
Language: en

A qualified CDI device disappears from an engine's registry even though a specification containing its name exists. Another file defines the same qualified name. Registry conflict handling and search-directory precedence can explain the result. Inspect the engine's complete effective specification set before regenerating yet another file or broadening device access.

## Inventory every discovery location

Record the actual engine, its configured CDI directories and each matching specification path. A tool and a daemon can read different directory sets. Include persistent and runtime-generated files with their provenance. Finding the expected name in one YAML file does not establish that the engine accepted that definition or that it is the only definition discovered.

## Separate identity from filename

The qualified device identity comes from the specification's kind and device name, not from its filename. Two differently named files can therefore describe the same requested device. Compare the relevant device edits and source ownership, not just timestamps. An old manually generated file can coexist with an automatically generated one while both appear independently reasonable.

## Read implementation-specific conflicts

The current reference CDI cache resolves definitions according to specification priority and records equal-priority conflicts; conflicted identities are removed from its usable device map. This is evidence about that implementation, not permission to assume every engine release has identical behavior. Check the engine's bundled implementation and diagnostic errors before relying on directory order as an implicit override mechanism.

## Preserve the intended generation owner

Identify whether packaging, an automatic refresh service or an administrator owns each file. Generating a new file can add another contender instead of fixing the conflict. Prepare a scoped reconciliation of the intended sources without deleting specifications used by other runtimes. A current host inventory remains necessary, but it cannot select the correct winner among contradictory registry definitions by itself.

## Verify registry and injection together

Use an isolated fixture with harmless duplicate definitions to observe the deployed implementation's behavior, then a single intended definition for a fresh bounded container. Compare registry errors, resolved identity and injected resources. Acceptance explains conflict resolution and ownership. It does not prove device permissions, computation readiness or that refreshing one engine's registry updates every other daemon on the host.

## Primary references

[Container Device Interface Specification](https://raw.githubusercontent.com/cncf-tags/container-device-interface/main/SPEC.md).

[CDI Registry Conflict Handling](https://raw.githubusercontent.com/cncf-tags/container-device-interface/main/pkg/cdi/cache.go).

[NVIDIA CDI Integration](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/cdi-support.html).

Related reading: [CDI device not found: checking NVIDIA device names and specifications](/journal/nvidia-cdi-device-selection/); [GPU works as root but not in a rootless container: runtime and device permissions](/journal/rootless-nvidia-cdi-permissions/).
