fix(manifest): pass --node_config_file so per-node config is actually loaded#99
fix(manifest): pass --node_config_file so per-node config is actually loaded#99Wangmin362 wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Wangmin362 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @Wangmin362! It looks like this is your first PR to Project-HAMi/ascend-device-plugin 🎉 |
📝 WalkthroughWalkthroughThe hami-ascend-device-plugin DaemonSet manifest is updated to add a new ChangesDevice Plugin Manifest Update
Estimated code review effort: 1 (Trivial) | ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
… loaded The DaemonSet mounts the node-config file (from configmap hami-device-node-config) at /node-config.yaml, but the container args only pass --config_file. Since main.go guards node-config loading with `if *nodeConfigFile != ""` and the flag defaults to empty, LoadNodeConfig is never called, so per-node settings (e.g. hami-vnpu-core, vDeviceCount) are silently ignored. Pass --node_config_file /node-config.yaml (the file is already mounted) so the per-node config is loaded. Signed-off-by: Wangmin362 <wangmin362@gmail.com>
44eaa47 to
2cd62ef
Compare
| - --config_file | ||
| - /device-config.yaml | ||
| - --node_config_file | ||
| - /node-config.yaml |
There was a problem hiding this comment.
The hami-device-node-config deployment is optional, so we need handle the case where it is not present.
ascend-device-plugin/README.md
Line 98 in 6f1113f
What this PR does
The shipped
ascend-device-plugin.yamlmounts a per-node config file (from configmaphami-device-node-config) at/node-config.yaml, but the containerargsonly pass--config_file. The--node_config_fileflag is never set.Since
cmd/main.goguards node-config loading with:and the flag defaults to empty,
LoadNodeConfigis never called. As a result any per-node setting (e.g.hami-vnpu-core: true,vDeviceCount) placed in the mounted node-config is silently ignored — the file is mounted but unused.This PR simply passes the flag (the file is already mounted):
Evidence
On a real 8×910B4 node:
Without the flag: the
hami-vnpu-corenode annotation staysfalse; the mounted node-config has no effect.After adding
--node_config_file /node-config.yamlto the DaemonSet args, the log immediately shows:and the node annotation flips to
hami-vnpu-core=true. The feature works — the manifest just didn't wire the flag.Scope
Manifest-only change (one flag). No code change.
Summary by CodeRabbit
AI assistance disclosure (per the project's AI Assistance Notice): the missing flag was found while testing per-node config on a real Ascend 910B4 node, where the node config never loaded until
--node_config_filewas added and the log then showedSuccessfully matched node config. This manifest one-liner was prepared with AI assistance (Claude Code) and verified by me on that node. I understand the change and stand behind it.