10000 Fix issue when validating with kernel filenames by meaksh · Pull Request #3192 · cobbler/cobbler · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix issue when validating with kernel filenames #3192

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

Merged
merged 3 commits into from
Jul 13, 2022

Conversation

meaksh
Copy link
Member
@meaksh meaksh commented Jul 13, 2022

This PR does the following:

  • Enhance find_kernel regex to match generic *.kernel names
  • Enhance error message when kernel is not valid.

The old error message was:

# cobbler distro add --name=test  --kernel=/tmp/my_kernel.foobar --initrd=/tmp/fooo
exception on server: kernel not found: /tmp/my_kernel.foobar

The new one:

# cobbler distro add --name=test  --kernel=/tmp/my_kernel.foobar --initrd=/tmp/fooo
exception on server: kernel not found or it does not match with allowed kernel filename pattern [(vmlinu[xz]|(kernel|linux(\.img)?)|pxeboot\.n12|wimboot|.+\.kernel)]: /tmp/my_kernel.foobar.

Fixes #3193

@SchoolGuy SchoolGuy added this to the v3.4.0 milestone Jul 13, 2022
@SchoolGuy SchoolGuy self-requested a review July 13, 2022 11:39
@SchoolGuy SchoolGuy linked an issue Jul 13, 2022 that may be closed by this pull request
Copy link
Member
@SchoolGuy SchoolGuy left a comment

Choose a reason for hiding this comment

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

Thanks for the find. That is really a nasty one for users.

@codecov
Copy link
codecov bot commented Jul 13, 2022

Codecov Report

Merging #3192 (854efb8) into main (30fb320) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #3192      +/-   ##
==========================================
- Coverage   63.60%   63.59%   -0.02%     
==========================================
  Files         109      109              
  Lines       14655    14655              
==========================================
- Hits         9322     9320       -2     
- Misses       5333     5335       +2     
Impacted Files Coverage Δ
cobbler/utils/__init__.py 65.72% <ø> (ø)
cobbler/items/distro.py 92.20% <100.00%> (ø)
cobbler/actions/reposync.py 58.78% <0.00%> (-0.47%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 30fb320...854efb8. Read the comment docs.

@SchoolGuy SchoolGuy merged commit 17c6736 into main Jul 13, 2022
@SchoolGuy SchoolGuy deleted the main-enhance-allowed-kernel-filenames branch July 13, 2022 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Kernel not found error message is not precise
2 participants
0