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

Fix-for-zfs-dracut-regression-#8913 #9379

Conversation

dacianstremtan
Copy link
Contributor

@dacianstremtan dacianstremtan commented Sep 30, 2019

Line 31 and 32 overwrote the ${root} variable which broke mount-zfs.sh

Signed-off-by: Dacian Reece-Stremtan [email protected]

This fixes the issue #8913.
We have create a new variable for the dataset instead of overwriting the ${root} variable in zfs-load-key.sh

Motivation and Context

#8913

Description

How Has This Been Tested?

Create a new initramfs using dracut and restarted the computer. This was done on two separate computers running Centos 7.7

Centos 7.7, zfs 0.8.2
Rebuilt initramfs using dracut on the systems mentioned above. Restarted the system. Instead of failing to start because the root was not mounted (using zfs root), now the computer started all the way.

Fixes problem in mount-zfs.sh where the script is bypassed because the ${root} variable was overwritten in zfs-load-key.sh to hold only the dataset name and not the kernel line option for zfs root.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist:

Line 31 and 32 overwrote the ${root} variable which broke mount-zfs.sh

Signed-off-by: Dacian Reece-Stremtan <[email protected]>
@behlendorf behlendorf added Component: Dracut dracut integration Status: Code Review Needed Ready for review and testing labels Sep 30, 2019
@codecov
Copy link

codecov bot commented Oct 1, 2019

Codecov Report

Merging #9379 into master will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9379      +/-   ##
==========================================
+ Coverage   79.02%   79.06%   +0.03%     
==========================================
  Files         403      403              
  Lines      122539   122539              
==========================================
+ Hits        96838    96887      +49     
+ Misses      25701    25652      -49
Flag Coverage Δ
#kernel 79.76% <ø> (-0.01%) ⬇️
#user 66.74% <ø> (+0.13%) ⬆️

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 7bb0c29...e20ac9a. Read the comment docs.

Copy link
Contributor

@ghfields ghfields left a comment

Choose a reason for hiding this comment

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

Thanks. Looks like a reasonable way to implement what @tsandmann discussed in #8913 (comment)

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Oct 1, 2019
@behlendorf behlendorf merged commit bd76e68 into openzfs:master Oct 1, 2019
@dacianstremtan dacianstremtan deleted the Fix-for-zfs-dracut-regression-#8913 branch October 1, 2019 20:46
@Reamer
Copy link

Reamer commented Oct 22, 2019

Is this fix part of the next zfs release for centos 7.7?

@behlendorf
Copy link
Contributor

Yes, I've added it to the tracking list.

tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 26, 2019
Line 31 and 32 overwrote the ${root} variable which broke mount-zfs.sh
We have create a new variable for the dataset instead of overwriting the
${root} variable in zfs-load-key.sh${root} variable in zfs-load-key.sh

Reviewed-by: Kash Pande <[email protected]>
Reviewed-by: Garrett Fields <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Dacian Reece-Stremtan <[email protected]>
Closes openzfs#8913
Closes openzfs#9379
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 27, 2019
Line 31 and 32 overwrote the ${root} variable which broke mount-zfs.sh
We have create a new variable for the dataset instead of overwriting the
${root} variable in zfs-load-key.sh${root} variable in zfs-load-key.sh

Reviewed-by: Kash Pande <[email protected]>
Reviewed-by: Garrett Fields <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Dacian Reece-Stremtan <[email protected]>
Closes openzfs#8913
Closes openzfs#9379
tonyhutter pushed a commit that referenced this pull request Jan 23, 2020
Line 31 and 32 overwrote the ${root} variable which broke mount-zfs.sh
We have create a new variable for the dataset instead of overwriting the
${root} variable in zfs-load-key.sh${root} variable in zfs-load-key.sh

Reviewed-by: Kash Pande <[email protected]>
Reviewed-by: Garrett Fields <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Dacian Reece-Stremtan <[email protected]>
Closes #8913
Closes #9379
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Dracut dracut integration Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants