Update daemonset for when CONFIG_MEMORY_HOTPLUG is not Present#2517
Open
JunAr7112 wants to merge 1 commit into
Open
Update daemonset for when CONFIG_MEMORY_HOTPLUG is not Present#2517JunAr7112 wants to merge 1 commit into
JunAr7112 wants to merge 1 commit into
Conversation
Signed-off-by: Arjun <agadiyar@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR is created in response to this bug, essentially the driver DaemonSet can fail before the container starts because it always mounts /sys/devices/system/memory/auto_online_blocks, but that sysfs file only exists when the node kernel has CONFIG_MEMORY_HOTPLUG=y; kubelet then tries to create it under sysfs and gets operation not permitted. The MR changes will first discover whether GPU nodes have CONFIG_MEMORY_HOTPLUG, carry that boolean into driver rendering, and only mount /sys/devices/system/memory/auto_online_blocks when it exists.
...we will remove the mount that causes the error by requiring the auto_online_blocks
This tells Node Feature Discovery to report the kernel config option as a node label
If any GPU node lacks the label or has anything other than "true", the feature is treated as unavailable.
applyMemoryHotplugAutoOnlineMount(&obj.Spec.Template.Spec, n.memoryHotplugAutoOnline)Applies the mount decision during driver DaemonSet transformation.
The func applyMemoryHotplugAutoOnlineMount(podSpec *corev1.PodSpec, enabled bool) {...} will add the volume mount and hostpath volume if missing when enabled. If not enabled, it removes any existing sysfs-memory-online mount from all containers and removes the matching volume.
The memory-hotplug status is merged across all nodes in that pool. The pool supports the mount only if every node in the pool supports it.
Checklist
make lint)make validate-generated-assets)make validate-modules)Testing
The driver render test sets MemoryHotplugAutoOnline=false, renders the driver DaemonSet, and checks that /sys/devices/system/memory/auto_online_blocks is not present in the output. If memory hotplug is unsupported, the driver manifest does not include the problematic mount.
The node-pool tests create fake Kubernetes nodes with NFD labels. One test confirms that a node with MEMORY_HOTPLUG=true enables the flag. The other confirms that if nodes in the same pool are mixed, one with the label and one without, the pool disables the flag.
Also verified with a Starling system: