Skip to content

[ubuntu] Support non-standard kernel version naming#602

Open
jfernandez wants to merge 1 commit intoNVIDIA:mainfrom
jfernandez:support-custom-kernel-naming
Open

[ubuntu] Support non-standard kernel version naming#602
jfernandez wants to merge 1 commit intoNVIDIA:mainfrom
jfernandez:support-custom-kernel-naming

Conversation

@jfernandez
Copy link
Copy Markdown

@jfernandez jfernandez commented Feb 7, 2026

Query apt-cache for linux-headers package info once and attempt to parse the version using the existing major.minor.patch-revision regex. When the regex does not match (e.g. custom/distro kernels with non-standard naming), keep KERNEL_VERSION unchanged instead of failing. This preserves the existing resolution logic for standard Ubuntu kernels while allowing custom kernels to work without modification.

Applied to all Ubuntu/Debian variants and vgpu-manager Ubuntu variants.

Closes: #601

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot bot commented Feb 7, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@jfernandez jfernandez force-pushed the support-custom-kernel-naming branch from a70822e to 88ef378 Compare February 7, 2026 17:56
@jfernandez
Copy link
Copy Markdown
Author

@shivakunv ready for another review.

@shivakunv
Copy link
Copy Markdown
Contributor

@jfernandez Please share the test logs for both types of kernels, if available.

@rajathagasthya LGTM. PTAL

@jfernandez
Copy link
Copy Markdown
Author

@shivakunv I will verify the latest version with our infra this week. I should get you test logs before the end of the week.

@shivakunv shivakunv self-assigned this Apr 1, 2026
@shivakunv
Copy link
Copy Markdown
Contributor

@jfernandez : Have you had a chance to test it?

Query apt-cache for linux-headers package info once and attempt to parse
the version using the existing major.minor.patch-revision regex. When the
regex does not match (e.g. custom/distro kernels with non-standard naming),
keep KERNEL_VERSION unchanged instead of failing. This preserves the
existing resolution logic for standard Ubuntu kernels while allowing
custom kernels to work without modification.

Applied to all Ubuntu/Debian variants and vgpu-manager Ubuntu variants.

Closes: NVIDIA#601
Signed-off-by: Jose Fernandez <josef@netflix.com>
@jfernandez jfernandez force-pushed the support-custom-kernel-naming branch from 0f9b25c to bbf2bf3 Compare April 2, 2026 20:11
@jfernandez
Copy link
Copy Markdown
Author

jfernandez commented Apr 2, 2026

@shivakunv Testing surfaced a gap in the initial patch: the regex ([0-9]+).* was accidentally matching our kernel's package version (6.x.y-00004-g00fabdb6286a-1), extracting 6.x.y-00004 and producing a mangled KERNEL_VERSION whose headers package doesn't exist, so the fallback never triggered. I pushed a fix changing .* to \..* to require a dot after the revision, which is always present in standard Ubuntu versions but not in our custom format.

Logic is working as expected after this change, here are the logs for both our custom kernel and standard Ubuntu:

Custom kernel (Ubuntu 22.04, 6.x.ynetflix-00004-g00fabdb6286a):

Resolving Linux kernel version...
Proceeding with Linux kernel version 6.x.ynetflix-00004-g00fabdb6286a

Standard Ubuntu kernel (Ubuntu 22.04 VM, 5.15.0-173-generic):

Resolving Linux kernel version...
Proceeding with Linux kernel version 5.15.0-173-generic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Ubuntu driver scripts assume standard kernel version naming, breaking custom kernels

3 participants