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
1 year, 6 months
Change in ...nfs-ganesha[next]: Get time_delta from FSAL dynamic fsinfo
by Frank Filz (GerritHub)
Frank Filz has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/523214 )
Change subject: Get time_delta from FSAL dynamic fsinfo
......................................................................
Get time_delta from FSAL dynamic fsinfo
Note that this change by itself doesn't do much. All in-tree FSALs
report 1 second time_delta...
Change-Id: I259eaa032fcc90e5e4d9b90d0ec7a3c3e9231ef1
Signed-off-by: Frank S. Filz <ffilzlnx(a)mindspring.com>
---
M src/Protocols/NFS/nfs3_fsinfo.c
M src/Protocols/NFS/nfs_proto_tools.c
2 files changed, 30 insertions(+), 7 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/14/523214/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/523214
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: I259eaa032fcc90e5e4d9b90d0ec7a3c3e9231ef1
Gerrit-Change-Number: 523214
Gerrit-PatchSet: 1
Gerrit-Owner: Frank Filz <ffilzlnx(a)mindspring.com>
Gerrit-MessageType: newchange
1 year, 9 months
VFS FSAL : directory remove problem
by Rahul Deshmukh
Hello All,
This is regarding the problem observed in nfs ganesha. The problem is when
one try to
remove the directory (in case of VFS FSAL) it returned with an error
"Device or
resource busy".Interestingly it mount that directory at client side.
I have investigated this problem and found out that the fsid is getting
changed and hence
problem is when we try to remove the directory. Further investigation
revealed that problem
actually happening at the time of directory creation time.
Following is portion of code from makedir()
--------------->8--------------------------
❘⠀⠀⠀if (attrib->valid_mask) {
❘⠀⠀⠀❘⠀⠀⠀/* Now per support_ex API, if there are any other attributes
❘⠀⠀⠀❘⠀⠀⠀ * set, go ahead and get them set now.
❘⠀⠀⠀❘⠀⠀⠀ */
❘⠀⠀⠀❘⠀⠀⠀status = (*handle)->obj_ops->setattr2(*handle, false, NULL,
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀ attrib);
❘⠀⠀⠀❘⠀⠀⠀if (FSAL_IS_ERROR(status)) {
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀/* Release the handle we just allocated. */
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀LogFullDebug(COMPONENT_FSAL,
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀ "setattr2 status=%s",
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀ fsal_err_txt(status));
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀(*handle)->obj_ops->release(*handle);
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀*handle = NULL;
❘⠀⠀⠀❘⠀⠀⠀} else if (attrs_out != NULL) {
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀status = (*handle)->obj_ops->getattrs(*handle,
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀ attrs_out);
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀if (FSAL_IS_ERROR(status) &&
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀ (attrs_out->request_mask & ATTR_RDATTR_ERR) == 0) {
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀/* Get attributes failed and caller expected
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀ * to get the attributes.
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀ */
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀goto fileerr;
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀}
❘⠀⠀⠀❘⠀⠀⠀}
❘⠀⠀⠀} else {
❘⠀⠀⠀❘⠀⠀⠀status.major = ERR_FSAL_NO_ERROR;
❘⠀⠀⠀❘⠀⠀⠀status.minor = 0;
❘⠀⠀⠀❘⠀⠀⠀if (attrs_out != NULL) {
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀/* Since we haven't set any attributes other than what
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀ * was set on create, just use the stat results we used
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀ * to create the fsal_obj_handle.
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀ */
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀posix2fsal_attributes_all(&stat, attrs_out); <=========
❘⠀⠀⠀❘⠀⠀⠀}
----------------->8--------------------------
It is observed that when we create a directory (VFS FSAL case) we land in
else block and
we set the fsid using device major and minor number irrespective of fsid
type or even
fsid_device setting. Because of this mdcache entry has a fsid setting where
device major
and minor number is used. This causes the directory removal operation to
fail.
This code change is added by following commit :
--------------->8--------------------------
commit de7f5712c898d9f5b51a8188cbee5282a9b9d533
Author: Frank S. Filz <ffilzlnx(a)mindspring.com>
Date: Wed Jun 15 09:34:14 2016 -0700
Pass attributes out on fsal_obj_handle create and readdir
When an FSAL object is created, most FSALs must get the file attributes
in order to properly create the fsal_obj_handle, in this case, since
many
callers (including MDCACHE) will need attributes, it makes sense to pass
them up instead of having an additional getattrs call.
The same can be said of readdir, so go ahead an pass the attributes up
on the call back.
MDCACHE has also been somewhat re-organized to perform cached object
creates in the same way as much as makes sense.
Change-Id: Ia89bb16356fa5117169e80b66b7d27e0a6a0e23e
Signed-off-by: Frank S. Filz <ffilzlnx(a)mindspring.com>
---------------->8--------------------------
Looks like mkdir is one of the operations affected. Though I have not
tested others.
One possible solution, I think, is to fill fsid based on fsid_device global
setting
Or maybe call getattr blindly. I have tested getattr call instead of using
stat data.
Please suggest.
Thanks,
Rahul.
1 year, 9 months
Announce Push of V4-dev.72
by Frank Filz
Branch next
Tag:V4-dev.72
Merge Highlights
* Fix crash when trying to export a VFS directory that doesn't exist
Signed-off-by: Frank S. Filz <ffilzlnx(a)mindspring.com>
Contents:
be092f7e5 Frank S. Filz V4-dev.72
fcfd5bab9 Frank S. Filz Fix crash when trying to export a VFS directory that
doesn't exist
1 year, 9 months
Announce Push of V4-dev.71
by Frank Filz
Branch next
Tag:V4-dev.71
Merge Highlights
* Fix issues with op_ctx->client being NULL
Signed-off-by: Frank S. Filz <ffilzlnx(a)mindspring.com>
Contents:
6e41c2210 Frank S. Filz V4-dev.71
10e60b6d6 Frank S. Filz FSAL_GLUSTER: replace SET_GLUSTER_CREDS with smarter
macros
cba557ea2 Frank S. Filz Set op_ctx->client for NLM or NFSv4 locks if not set
in op_ctx
1 year, 9 months
Change in ...nfs-ganesha[next]: FSAL_GLUSTER: replace SET_GLUSTER_CREDS with smarter macros
by Frank Filz (GerritHub)
Frank Filz has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/522007 )
Change subject: FSAL_GLUSTER: replace SET_GLUSTER_CREDS with smarter macros
......................................................................
FSAL_GLUSTER: replace SET_GLUSTER_CREDS with smarter macros
RESET_GLUSTER_CREDS:
Quick and simple reset after op.
SET_GLUSTER_CREDS_OP_CTX:
Set creds from op_ctx, if USE_GLUSTER_DELEGATION lease_id will be set
from op_ctx->caller_addr or op_ctx->client->cl_addrbuf if possible,
otherwise it will be set to NULL.
SET_GLUSTER_CREDS_MY_FD:
Set creds from my_fd, copying lease_id if USE_GLUSTER_DELEGATION.
SET_GLUSTER_LEASE_ID:
If USE_GLUSTER_DELEGATION set lease_id in my_fd from op_ctx as from
op_ctx->caller_addr or op_ctx->client->cl_addrbuf if possible, otherwise
set it to all zeros.
Change-Id: Iffef1463d3a71e78ee3a38ecd2b8e3390fabde7b
Signed-off-by: Frank S. Filz <ffilzlnx(a)mindspring.com>
---
M src/FSAL/FSAL_GLUSTER/ds.c
M src/FSAL/FSAL_GLUSTER/gluster_internal.h
M src/FSAL/FSAL_GLUSTER/handle.c
M src/FSAL/FSAL_GLUSTER/mds.c
4 files changed, 158 insertions(+), 214 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/07/522007/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/522007
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: Iffef1463d3a71e78ee3a38ecd2b8e3390fabde7b
Gerrit-Change-Number: 522007
Gerrit-PatchSet: 1
Gerrit-Owner: Frank Filz <ffilzlnx(a)mindspring.com>
Gerrit-MessageType: newchange
1 year, 9 months