diff options
author | nik-redhat <nladha@redhat.com> | 2020-03-24 16:48:21 +0530 |
---|---|---|
committer | Sanju Rakonde <sanjurakonde@review.gluster.org> | 2020-06-29 10:15:33 +0000 |
commit | 384431030a7f2c4d303cabe1406a87be773ba0c4 (patch) | |
tree | 35b3cfa161085db860fa7231688f1100c49b3b82 /xlators/mgmt/glusterd/src/glusterd-snapd-svc.c | |
parent | cff7804a0604b1b2ab2d91920af163bd95653ae7 (diff) |
glusterd: additional log information
Issue:
Some of the functions didn't had sufficient
logging of information in case of failure.
Fix:
Added log information in few functions in
case of failure indicating the cause of
such event.
Change-Id: I301cf3a1c8d2c94505c6ae0d83072b0241c36d84
fixes: #874
Signed-off-by: nik-redhat <nladha@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-snapd-svc.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-snapd-svc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c b/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c index 3042789916c..1f3f4909cbb 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c @@ -87,8 +87,10 @@ glusterd_snapdsvc_init(void *data) svc = &(volinfo->snapd.svc); ret = snprintf(svc->name, sizeof(svc->name), "%s", snapd_svc_name); - if (ret < 0) + if (ret < 0) { + gf_smsg(this->name, GF_LOG_ERROR, errno, GD_MSG_COPY_FAIL, NULL); goto out; + } notify = glusterd_snapdsvc_rpc_notify; @@ -115,6 +117,7 @@ glusterd_snapdsvc_init(void *data) glusterd_svc_build_snapd_logfile(logfile, logdir, sizeof(logfile)); len = snprintf(volfileid, sizeof(volfileid), "snapd/%s", volinfo->volname); if ((len < 0) || (len >= sizeof(volfileid))) { + gf_smsg(this->name, GF_LOG_ERROR, errno, GD_MSG_COPY_FAIL, NULL); ret = -1; goto out; } @@ -305,6 +308,7 @@ glusterd_snapdsvc_start(glusterd_svc_t *svc, int flags) len = snprintf(valgrind_logfile, PATH_MAX, "%s/valgrind-snapd.log", svc->proc.logdir); if ((len < 0) || (len >= PATH_MAX)) { + gf_smsg(this->name, GF_LOG_ERROR, errno, GD_MSG_COPY_FAIL, NULL); ret = -1; goto out; } |