Skip to content
New issue

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

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

Already on GitHub? # to your account

client/fingerprint: lookup kernel builtin bridge modules #8721

Merged
merged 2 commits into from
Aug 24, 2020

Conversation

code0x9
Copy link
Contributor

@code0x9 code0x9 commented Aug 24, 2020

centos epel kernel 4.x(kernel-lt) and 5.x(kernel-ml) changed bridge module to kernel-builtin, so centos with newer kernel(from epel repo) cannot detect bridge module.

I think it's better to lookup builtin modules too.

I have followed centos kernel upgrade instruction here: https://phoenixnap.com/kb/how-to-upgrade-kernel-centos

@hashicorp-cla
Copy link

hashicorp-cla commented Aug 24, 2020

CLA assistant check
All committers have signed the CLA.

@shoenig
Copy link
Member

shoenig commented Aug 24, 2020

LGTM, thanks @code0x9 !

@shoenig shoenig merged commit 1bb8f19 into hashicorp:master Aug 24, 2020
@code0x9 code0x9 deleted the b-kernel-builtin-module branch August 25, 2020 02:13
shoenig added a commit that referenced this pull request Nov 9, 2020
In Nomad v0.12.0, the client added additional fingerprinting around the
presense of the bridge kernel module. The fingerprinter only checked in
`/proc/modules` which is a list of loaded modules. In some cases, the
bridge kernel module is builtin rather than dynamically loaded. The fix
for that case is in #8721. However we were still missing the case where
the bridge module is dynamically loaded, but not yet loaded during the
startup of the Nomad agent. In this case the fingerprinter would believe
the bridge module was unavailable when really it gets loaded on demand.

This PR now has the fingerprinter scan the kernel module dependency file,
which will contain an entry for the bridge module even if it is not yet
loaded.

In summary, the client now looks for the bridge kernel module in
 - /proc/modules
 - /lib/modules/<kernel>/modules.builtin
 - /lib/modules/<kernel>/modules.dep

Closes #8423
@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 Dec 20, 2022
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants