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

kvs: Fix corner case in which symlink points to root dir #1404

Merged
merged 2 commits into from
Mar 30, 2018

Conversation

chu11
Copy link
Member

@chu11 chu11 commented Mar 30, 2018

Fix corner case in which a symlink in the kvs points to the root dir, i.e. ".".

I discovered this corner case while working on #1341. I realized users will probably often do:

mysymlink -> namespace/.

i.e. a symlink simply points to the root of another namespace. But root dirs were not handled at all within symlinks.

chu11 added 2 commits March 30, 2018 16:06
Fix corner case if a symlink is specifically a ".", i.e. the symlink
points to the root directory of the kvs.
@garlick
Copy link
Member

garlick commented Mar 30, 2018

Oh good one. Yes, I would imagine the "guest KVS namespaces" described in RFC 16 would be linked (instead of "mounted") exactly like that.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.001%) to 78.779% when pulling efa543a on chu11:symlinkperiod into a7402b5 on flux-framework:master.

@codecov-io
Copy link

Codecov Report

Merging #1404 into master will increase coverage by <.01%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master    #1404      +/-   ##
==========================================
+ Coverage   78.46%   78.47%   +<.01%     
==========================================
  Files         163      163              
  Lines       29981    29983       +2     
==========================================
+ Hits        23526    23528       +2     
  Misses       6455     6455
Impacted Files Coverage Δ
src/modules/kvs/lookup.c 79.78% <66.66%> (+0.08%) ⬆️
src/common/libflux/request.c 88.46% <0%> (-1.29%) ⬇️
src/common/libutil/dirwalk.c 93.57% <0%> (-0.72%) ⬇️
src/common/libkvs/kvs_watch.c 90.98% <0%> (-0.43%) ⬇️
src/cmd/flux-module.c 85.06% <0%> (-0.31%) ⬇️
src/broker/overlay.c 74.45% <0%> (+0.31%) ⬆️
src/common/libutil/blobref.c 98.61% <0%> (+1.38%) ⬆️
src/common/libflux/attr.c 92% <0%> (+2%) ⬆️

@chu11
Copy link
Member Author

chu11 commented Mar 30, 2018

code coverage of diff is bad, but its just 1 missed "impossible error" path.

@garlick garlick merged commit 6c5e47d into flux-framework:master Mar 30, 2018
@grondo grondo mentioned this pull request May 10, 2018
@chu11 chu11 deleted the symlinkperiod branch June 5, 2021 16:09
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.

4 participants