Add host ID to host fingerprint attributes - #28406
Conversation
tgross
left a comment
There was a problem hiding this comment.
Let's add a changelog entry for this so users know they can pick it up in their own jobspecs if they want. I dunno how you want to describe this to users because it varies depending on the host OS (and even host OS setup). Maybe just describe it as a "unique host ID"?
| resp.AddAttribute("kernel.name", runtime.GOOS) | ||
| resp.AddAttribute("kernel.arch", hostInfo.KernelArch) | ||
|
|
||
| resp.AddAttribute("unique.hostId", hostInfo.HostID) |
There was a problem hiding this comment.
We're not super consistent about it but most of the built-in fingerprints use snake_case instead of camelCase
9b5eb3d to
d518954
Compare
|
|
||
| IMPROVEMENTS: | ||
|
|
||
| * client: Added the `unique.host_id` node attribute to the host fingerprint. When available, It can be used in job constraints and other node attribute-based workflows. |
There was a problem hiding this comment.
Using term When available becz gopsutil lib does its best to find out the uniq_id depending on the platform (linux, window etc) but in case if it can't find one, It will return an empty string.
There was a problem hiding this comment.
This is in the PR checklist, but heads up that in core you add changelog entries but running make cl, which generates a little .changelog/<PR ID>.txt file that gets assembled during the release process. That makes it feasible to land lots of changes for a big project concurrently without constantly hitting merge conflicts.
| * client: Added the `unique.host_id` node attribute to the host fingerprint. When available, It can be used in job constraints and other node attribute-based workflows. | |
| * client: Added the `unique.host_id` node attribute to the host fingerprint, when available |
|
|
||
| IMPROVEMENTS: | ||
|
|
||
| * client: Added the `unique.host_id` node attribute to the host fingerprint. When available, It can be used in job constraints and other node attribute-based workflows. |
There was a problem hiding this comment.
This is in the PR checklist, but heads up that in core you add changelog entries but running make cl, which generates a little .changelog/<PR ID>.txt file that gets assembled during the release process. That makes it feasible to land lots of changes for a big project concurrently without constantly hitting merge conflicts.
| * client: Added the `unique.host_id` node attribute to the host fingerprint. When available, It can be used in job constraints and other node attribute-based workflows. | |
| * client: Added the `unique.host_id` node attribute to the host fingerprint, when available |
2cd3fe6 to
27be3fd
Compare
|
Added a Jira link there for you. Looks like the backport cherry-pick failed, but I'll take care of that for you because it's almost certainly a flake in the tooling |
Ref: https://hashicorp.atlassian.net/browse/NMD-1667 Co-authored-by: Divyansh Singh <divyansh-singh@ibm.com>
Description
Testing & Reproduction steps
Links
https://hashicorp.atlassian.net/browse/NMD-1667
Contributor Checklist
changelog entry using the
make clcommand.ensure regressions will be caught.
and job configuration, please update the Nomad product documentation, which is stored in the
web-unified-docsrepo. Refer to theweb-unified-docscontributor guide for docs guidelines.Please also consider whether the change requires notes within the upgrade
guide. If you would like help with the docs, tag the
nomad-docsteam in this PR.and followed the AI usage guide.
Reviewer Checklist
backporting document.
in the majority of situations. The main exceptions are long-lived feature branches or merges where
history should be preserved.
within the public repository.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.