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

Update zfs-functions.in #10382

Merged
merged 1 commit into from
May 29, 2020
Merged

Update zfs-functions.in #10382

merged 1 commit into from
May 29, 2020

Conversation

allen-4
Copy link
Contributor

@allen-4 allen-4 commented May 28, 2020

Motivation and Context

Closes #10341
Related to bug #10341 and #10376
The init.d zfs-share script does not perform the intended action without having a variable set for ZFS_SHARE and ZFS_UNSHARE

Description

Assign default values to ZFS_SHARE and ZFS_UNSHARE. Export the environment variables after sourcing the configuration file.

How Has This Been Tested?

Tested on gentoo with kernel version 5.6.14

Types of changes

  • [x ] 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:

  • [ x] My code follows the ZFS on Linux code style requirements.
  • I have updated the documentation accordingly.
  • [x ] I have read the contributing document.
  • I have added tests to cover my changes.
  • I have run the ZFS Test Suite with this change applied.
  • All commit messages are properly formatted and contain Signed-off-by.

@codecov-commenter
Copy link

codecov-commenter commented May 28, 2020

Codecov Report

Merging #10382 into master will decrease coverage by 0.14%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10382      +/-   ##
==========================================
- Coverage   79.36%   79.22%   -0.15%     
==========================================
  Files         391      391              
  Lines      123585   123585              
==========================================
- Hits        98086    97907     -179     
- Misses      25499    25678     +179     
Flag Coverage Δ
#kernel 79.97% <ø> (+0.01%) ⬆️
#user 64.28% <ø> (-0.99%) ⬇️
Impacted Files Coverage Δ
module/icp/algs/modes/gcm.c 77.04% <0.00%> (-4.77%) ⬇️
module/lua/lmem.c 83.33% <0.00%> (-4.17%) ⬇️
module/zfs/vdev_raidz.c 89.65% <0.00%> (-2.95%) ⬇️
module/zfs/vdev_removal.c 93.90% <0.00%> (-2.76%) ⬇️
module/zfs/vdev_indirect_mapping.c 96.61% <0.00%> (-1.94%) ⬇️
module/zfs/metaslab.c 94.12% <0.00%> (-1.67%) ⬇️
module/zfs/zio.c 87.12% <0.00%> (-1.54%) ⬇️
module/zfs/vdev_queue.c 94.62% <0.00%> (-1.50%) ⬇️
module/zfs/vdev_indirect.c 73.33% <0.00%> (-1.34%) ⬇️
cmd/ztest/ztest.c 74.11% <0.00%> (-1.29%) ⬇️
... and 42 more

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 70a5fc0...212a025. Read the comment docs.

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label May 28, 2020
@behlendorf
Copy link
Contributor

@gyakovlev @ryao would you mind reviewing this.

@behlendorf
Copy link
Contributor

@allen-4 thanks for looking in to this. Could you please your signed-off-by to the commit message and update the PR.

Copy link
Contributor

@ryao ryao left a comment

Choose a reason for hiding this comment

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

LGTM

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels May 28, 2020
Signed-off-by: Allen Holl <allen.m.holl@gmail.com>

Adding sign off to commit
@allen-4
Copy link
Contributor Author

allen-4 commented May 29, 2020

@behlendorf Thank you, I added my sign-off. Hope I got it right, I'm very new to github.

@gyakovlev
Copy link
Contributor

LGTM
as I said before re-ordering and exporting those variables is not technically required but logically correct, and good thing to do.
it will make sure external processes receive consistent environment.
script scope env already used overrides from conf.d file.

@behlendorf behlendorf merged commit 4d829ad into openzfs:master May 29, 2020
as-com pushed a commit to as-com/zfs that referenced this pull request Jun 20, 2020
The init.d zfs-share script does not perform the intended 
action without having a variable set for ZFS_SHARE and 
ZFS_UNSHARE

Assign default values to ZFS_SHARE and ZFS_UNSHARE. Export 
the environment variables after sourcing the configuration 
file.

Reviewed-by: Richard Yao <ryao@gentoo.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Signed-off-by: Allen Holl <allen.m.holl@gmail.com>
Closes openzfs#10341 
Closes openzfs#10382 
(cherry picked from commit 4d829ad)
jsai20 pushed a commit to jsai20/zfs that referenced this pull request Mar 30, 2021
The init.d zfs-share script does not perform the intended 
action without having a variable set for ZFS_SHARE and 
ZFS_UNSHARE

Assign default values to ZFS_SHARE and ZFS_UNSHARE. Export 
the environment variables after sourcing the configuration 
file.

Reviewed-by: Richard Yao <ryao@gentoo.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Signed-off-by: Allen Holl <allen.m.holl@gmail.com>
Closes openzfs#10341 
Closes openzfs#10382
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NFS shares are not exported on boot with openrc systems
5 participants