Change in ...nfs-ganesha[next]: Allow EXPORT pseudo path to be changed during export update
by Frank Filz (GerritHub)
Frank Filz has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/490334 )
Change subject: Allow EXPORT pseudo path to be changed during export update
......................................................................
Allow EXPORT pseudo path to be changed during export update
This also fully allows adding or removing NFSv4 support from an export
since we can now handle the PseudoFS swizzing that occurs.
Note that an explicit PseudoFS export may be removed or added, though
you can not change it from export_id 0 because we currently don't allow
changing the export_id.
Note that this patch doesn't handle DBUS add or remove export though
that is an option to improve. I may add them to this patch (it wouldn't
be that hard) but I want to get this reviewed as is right now.
There are implications to a client of changing the PseudoFS. I have
tested moving an export in the PseudoFS with a client mounted. The
client will be able to continue accessing the export, though it may
see an ESTALE error if it navigates out of the export. The current
working directory will go bad and the pwd comment will fail indicating
a disconnected mount. I have also seen referencing .. from the root of
the export wrapping around back to the root (I believe this is how
disconnected mounts are set up).
FSAL_PSEUDO lookups and create handles (PUTFH or any use of an NFSv3
handle where the inode isn't cached) which fail during an export update
are instead turned into ERR_FSAL_DELAY which turns into NFS4ERR_DELAY or
NFS3ERR_JUKEBOX to force the client to retry under the completed update.
Change-Id: I507dc17a651936936de82303ff1291677ce136be
Signed-off-by: Frank S. Filz <ffilzlnx(a)mindspring.com>
---
M src/FSAL/FSAL_PSEUDO/handle.c
M src/MainNFSD/libganesha_nfsd.ver
M src/Protocols/NFS/nfs4_pseudo.c
M src/include/export_mgr.h
M src/include/nfs_proto_functions.h
M src/support/export_mgr.c
M src/support/exports.c
7 files changed, 560 insertions(+), 203 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/34/490334/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/490334
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I507dc17a651936936de82303ff1291677ce136be
Gerrit-Change-Number: 490334
Gerrit-PatchSet: 1
Gerrit-Owner: Frank Filz <ffilzlnx(a)mindspring.com>
Gerrit-MessageType: newchange
7 months, 3 weeks
Monitoring in Ganesha?
by Bjorn Leffler
Apart from the counters that you can access through dbus, is there any
other monitoring built into Ganesha?
I'm thinking of adding it with this higher level plan:
- Exporting metrics from Ganesha to Prometheus.
- Aggregate data in Prometheus.
- Display monitoring consoles and graphs with Grafana.
- Package up Prometheus, Grafana and the preconfigured rules/dashboards as
a Docker image.
- This makes it straightforward to deploy monitoring alongside a Gansha
binary.
My rough coding plan for the code is to:
- Add a USE_MONITORING directive to the CMakeLists.txt files.
- Add a build dependency to the Prometheus C client
<https://github.com/digitalocean/prometheus-client-c>.
- Create a src/monitoring directory for the new source files and templates.
- Increment counters and timers throughout the code.
- Use histograms to compute latency percentiles, heatmaps, etc.
Is this a good idea? Any objections or suggestions?
Thanks,
Bjorn
2 years, 10 months
Running pynfs on macOS
by Matthew DeVore
Quick update on macOS progress.
I just uploaded 4 patches to Gerrit which (along with other build hacks, shared
previously [1]) allow macOS to run the pynfs 4.0 suite without crashing.
I thought I may be done with crash bugs, but I hit another one while editing an
FSAL_MEM-backed file in Vim, and the pynfs 4.1 suite has at least one crash
failure too (related to lock misuse, similar to the last 4 patches).
I will continue to send patches for non-macOS-specific correctness bugs.
The pynfs 4.0 suite still has failures [2]. I may not address these at all,
depending on the root cause, since I'm not really concerned with FSAL_MEM in
particular, since I plan to be writing my own FSAL backend.
[1] https://github.com/matvore/nfs-ganesha
[2]
WRT5a st_write.testMaximumData : FAILURE
READ did not correspond to WRITE with large dataset
--
SATT18 st_setattr.testMixed : FAILURE
Changing size from 0 to 10 and owner to b'65534' using
stateid=0 should return NFS4_OK, instead got
NFS4ERR_PERM
--
SEC7 st_secinfo.testRPCSEC_GSS : FAILURE
SECINFO returned mechanism list without RPCSEC_GSS
--
OPEN30 st_open.testReplay : FAILURE
non-replayed open should fail should return
NFS4ERR_SHARE_DENIED, instead got NFS4_OK
--
OPEN25 st_open.testDenyWrite1 : FAILURE
OPEN with access==write on a write-denied file should
return NFS4ERR_SHARE_DENIED, instead got NFS4_OK
--
OPEN21 st_open.testDenyRead1 : FAILURE
OPEN with access==read on a read-denied file should
return NFS4ERR_SHARE_DENIED, instead got NFS4_OK
--
WRT5a st_write.testMaximumData : FAILURE
READ did not correspond to WRITE with large dataset
--
SATT18 st_setattr.testMixed : FAILURE
Changing size from 0 to 10 and owner to b'65534' using
stateid=0 should return NFS4_OK, instead got
NFS4ERR_PERM
--
SEC7 st_secinfo.testRPCSEC_GSS : FAILURE
SECINFO returned mechanism list without RPCSEC_GSS
--
OPEN30 st_open.testReplay : FAILURE
non-replayed open should fail should return
NFS4ERR_SHARE_DENIED, instead got NFS4_OK
--
OPEN25 st_open.testDenyWrite1 : FAILURE
OPEN with access==write on a write-denied file should
return NFS4ERR_SHARE_DENIED, instead got NFS4_OK
--
OPEN21 st_open.testDenyRead1 : FAILURE
OPEN with access==read on a read-denied file should
return NFS4ERR_SHARE_DENIED, instead got NFS4_OK
3 years, 11 months
Change in ...nfs-ganesha[next]: MDCACHE - Add MDCACHE {} config block
by Daniel Gryniewicz (GerritHub)
Daniel Gryniewicz has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/454929
Change subject: MDCACHE - Add MDCACHE {} config block
......................................................................
MDCACHE - Add MDCACHE {} config block
Add a config block name MDCACHE that is a copy of CACHEINODE. Both can
be configured, but MDCACHE will override CACHEINODE. This allows us to
deprecate CACHEINODE.
Change-Id: I49012723132ae6105b904a60d1a96bb2bf78d51b
Signed-off-by: Daniel Gryniewicz <dang(a)fprintf.net>
---
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_read_conf.c
M src/config_samples/ceph.conf
M src/config_samples/config.txt
M src/config_samples/ganesha.conf.example
M src/doc/man/ganesha-cache-config.rst
M src/doc/man/ganesha-config.rst
6 files changed, 31 insertions(+), 7 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/29/454929/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/454929
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I49012723132ae6105b904a60d1a96bb2bf78d51b
Gerrit-Change-Number: 454929
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Gryniewicz <dang(a)redhat.com>
Gerrit-MessageType: newchange
3 years, 11 months
Announce Push of V4-dev.40
by Frank Filz
Branch next
Tag:V4-dev.40
Merge Highlights
* various lock fixes exposed by running on MacOS
* FSAL_CEPH: add LTTng to FSAL_CEPH
* FSAL_PROXY_V3: fix build warning in rpc.c
* Gather unix uid and gid using wbcGetpwsid
* Config option to control UDP for mount protocol
* Throttling uid2grp requests.
Signed-off-by: Frank S. Filz <ffilzlnx(a)mindspring.com>
Contents:
2753385 Frank S. Filz V4-dev.40
78f3281 ssukruth Throttling uid2grp requests.
a61ff9c Suhrud Patankar Config option to control UDP for mount protocol
e4c7b28 Markus Blank-Burian Gather unix uid and gid using wbcGetpwsid
476350c Kaleb S. KEITHLEY FSAL_PROXY_V3: fix build warning in rpc.c
21658f1 Vicente Cheng FSAL_CEPH: add LTTng to FSAL_CEPH
04ffc6a Matthew DeVore readdir: Lock only after confirming dir and parms
319623e Matthew DeVore mem_handle: Do not grab lock on destroyed handle
ba97145 Matthew DeVore secinfo: Grab lock only after confirming directory
feacd97 Matthew DeVore state_deleg: Grab lock after confirming reg file
3 years, 11 months
Change in ...nfs-ganesha[next]: readdir: Lock only after confirming dir and parms
by Matthew DeVore (GerritHub)
Matthew DeVore has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/505172 )
Change subject: readdir: Lock only after confirming dir and parms
......................................................................
readdir: Lock only after confirming dir and parms
Before this patch, nfs4_readdir_callback locked the junction lock before
checking if the object was a directory or not. Now nfs4_readdir_callback
only locks before checking the object, but after confirming other things
that don't require a lock.
Fixes crash that occurs on macOS when running st_readdir.testFirst from
pynfs, because it prevents access of the lock in the wrong side of the
lock union in state_hdl.
Change-Id: I0e2a87c1d81e458c1da8601afef190bed896d78f
Signed-off-by: Matthew DeVore <matvore(a)google.com>
---
M src/Protocols/NFS/nfs4_op_readdir.c
1 file changed, 10 insertions(+), 5 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/72/505172/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/505172
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I0e2a87c1d81e458c1da8601afef190bed896d78f
Gerrit-Change-Number: 505172
Gerrit-PatchSet: 1
Gerrit-Owner: Matthew DeVore <matvore(a)google.com>
Gerrit-MessageType: newchange
3 years, 11 months
Change in ...nfs-ganesha[next]: mem_handle: Do not grab lock on destroyed handle
by Matthew DeVore (GerritHub)
Matthew DeVore has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/505151 )
Change subject: mem_handle: Do not grab lock on destroyed handle
......................................................................
mem_handle: Do not grab lock on destroyed handle
mem_clean_all_dirents is only called in one place, and it is after the
object handle has been destroyed. Hence, there is no valid lock to
acquire. This cleanup also happens after the final reference count to
the object is released, so there should be no danger of concurrent
modification.
This fixes a crash when running st_rename.testDirToDir in pynfs on
macOS.
Change-Id: I18b9cabcb31d82463279cb6232e0b26bbea16d4d
Signed-off-by: Matthew DeVore <matvore(a)google.com>
---
M src/FSAL/FSAL_MEM/mem_handle.c
1 file changed, 0 insertions(+), 4 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/51/505151/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/505151
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I18b9cabcb31d82463279cb6232e0b26bbea16d4d
Gerrit-Change-Number: 505151
Gerrit-PatchSet: 1
Gerrit-Owner: Matthew DeVore <matvore(a)google.com>
Gerrit-MessageType: newchange
3 years, 11 months
Change in ...nfs-ganesha[next]: secinfo: Grab lock only after confirming directory
by Matthew DeVore (GerritHub)
Matthew DeVore has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/505150 )
Change subject: secinfo: Grab lock only after confirming directory
......................................................................
secinfo: Grab lock only after confirming directory
We need to check the object type before grabbing one of the locks in the
state_hdl. As a bonus, this change deletes an "extra" unlock call needed
as a result of the if block usage.
Fixes crash that occurs on macOS when running st_create.testBlock from
pynfs, because it prevents access of the lock in the wrong side of the
lock union in state_hdl.
Change-Id: I5b40b8fa2ff11076b2858972ab4756458f36c816
Signed-off-by: Matthew DeVore <matvore(a)google.com>
---
M src/Protocols/NFS/nfs4_op_secinfo.c
1 file changed, 14 insertions(+), 10 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/50/505150/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/505150
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I5b40b8fa2ff11076b2858972ab4756458f36c816
Gerrit-Change-Number: 505150
Gerrit-PatchSet: 1
Gerrit-Owner: Matthew DeVore <matvore(a)google.com>
Gerrit-MessageType: newchange
3 years, 11 months