fix: DTK shared directory path mismatch due to NFD label sanitization #191
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The DTK flow was failing with path mismatches because the volume mount
path is created by network-operator using NFD labels, which sanitize
kernel version strings by replacing non-alphanumeric characters (except
-._) with underscores.
Example kernel: 5.14.0-570.60.1.el9_6.aarch64+64k
NFD label: feature.node.kubernetes.io/kernel-version.full=5.14.0-570.60.1.el9_6.aarch64_64k
This caused:
The mismatch led to timeout errors where one container waited for
dtk_start_compile flag in the sanitized path while the other container
created flags in the unsanitized path.
Fix: Apply NFD-compatible sanitization to kernel version when constructing
DTK_OCP_NIC_SHARED_DIR path in both entrypoint.sh and dtk_nic_driver_build.sh.
The FULL_KVER variable remains unchanged for package operations that require
the actual kernel version format.
This matches the sanitization logic in node-feature-discovery:
https://github.com/kubernetes-sigs/node-feature-discovery/blob/master/source/kernel/version.go#L38-L42
Applies to RT kernels (+rt) and 64k hugepage kernels (+64k) on RHEL/RHCOS.