Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fingerprint: add fingerprinting for CNI plugin versions #15452

Merged
merged 1 commit into from
Dec 5, 2022
Merged

Conversation

shoenig
Copy link
Member

@shoenig shoenig commented Dec 1, 2022

This PR adds a fingerprinter to set the attribute
"plugins.cni.version.<name>" -> version of the CNI plugin if present at $client.cni_path

First half of #14022
Second half will be adding an implicit constraint on applicable jobs.

e.g.

➜ nomad node status -self -verbose | grep plugins.cni.version
plugins.cni.version.bandwidth   = v1.0.0
plugins.cni.version.bridge      = v1.0.0
plugins.cni.version.custom      = v1.0.3
plugins.cni.version.dhcp        = v1.0.0
plugins.cni.version.firewall    = v1.0.0
plugins.cni.version.host-device = v1.0.0
plugins.cni.version.host-local  = v1.0.0
plugins.cni.version.ipvlan      = v1.0.0
plugins.cni.version.loopback    = v1.0.0
plugins.cni.version.macvlan     = v1.0.0
plugins.cni.version.portmap     = v1.0.0
plugins.cni.version.ptp         = v1.0.0
plugins.cni.version.sbr         = v1.0.0
plugins.cni.version.static      = v1.0.0
plugins.cni.version.tuning      = v1.0.0
plugins.cni.version.vlan        = v1.0.0
plugins.cni.version.vrf         = v1.0.0

Targets 1.5.0

@shoenig
Copy link
Member Author

shoenig commented Dec 2, 2022

Spot check

➜ nomad node status -self -verbose | grep plugins\.cni
plugins.cni.version       = v1.0.0

@shoenig shoenig marked this pull request as ready for review December 2, 2022 15:01
@shoenig shoenig added this to the 1.5.0 milestone Dec 2, 2022
@shoenig shoenig changed the title fingerprint: add fingerprinting for CNI plugins presense and version fingerprint: add fingerprinting for CNI plugin versions Dec 5, 2022
@shoenig shoenig requested a review from lgfa29 December 5, 2022 15:51
Copy link
Contributor

@lgfa29 lgfa29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments, but no blockers. Good one!

The v stuff in the fingerprint may be worth checking just to make sure it works with constraint and affinity.

client/fingerprint/plugins_cni.go Outdated Show resolved Hide resolved
client/fingerprint/plugins_cni.go Show resolved Hide resolved
client/fingerprint/plugins_cni.go Outdated Show resolved Hide resolved
.changelog/15452.txt Outdated Show resolved Hide resolved
This PR adds a fingerprinter to set the attribute
"plugins.cni.version.<name>" => "<version>"

for each CNI plugin in <client>.cni_path (/opt/cni/bin by default).
@shoenig
Copy link
Member Author

shoenig commented Jan 9, 2023

Backporting this so that #14022 can be merged sooner than later; the implicit constraint cannot be injected until users are already on a version of Nomad that fingerprints the CNI plugin.

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/1.2.x backport to 1.1.x release line backport/1.3.x backport to 1.3.x release line backport/1.4.x backport to 1.4.x release line
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants