Skip to content

Conversation

@frelon
Copy link
Contributor

@frelon frelon commented Mar 25, 2024

If kernel or initrd is named the default vmlinuz/initrd we skip the symlinking since the booting will work anyways.

If kernel or initrd is named the default vmlinuz/initrd we skip the
symlinking since the booting will work anyways.

Signed-off-by: Fredrik Lönnegren <[email protected]>
@frelon frelon requested a review from a team as a code owner March 25, 2024 09:04
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 72.34%. Comparing base (1625514) to head (fa51d8f).

Files Patch % Lines
pkg/elemental/elemental.go 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2028      +/-   ##
==========================================
- Coverage   72.36%   72.34%   -0.02%     
==========================================
  Files          76       76              
  Lines        9009     9012       +3     
==========================================
+ Hits         6519     6520       +1     
- Misses       1946     1947       +1     
- Partials      544      545       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@frelon frelon enabled auto-merge (squash) March 25, 2024 09:22
Copy link
Contributor

@ldevulder ldevulder left a comment

Choose a reason for hiding this comment

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

Just a small suggestion, but good to me!

} {
// if kernel/initrd is actually named "vmlinuz"/"initrd" we just skip the symlink part.
if kernel == name || initrd == name {
continue
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be a good idea to add a Debugf call just to simplify the debugging in case of issue:

Suggested change
continue
cfg.Logger.Debugf("No symlink needed, keeping exising %s file", name)
continue

@frelon frelon merged commit a9eeec6 into rancher:main Mar 25, 2024
@frelon frelon deleted the skip-symlink branch March 25, 2024 12:33
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.

3 participants