summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-shd-svc.c
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2019-03-15 19:31:03 +0530
committerRavishankar N <ravishankar@redhat.com>2019-03-27 00:18:30 +0000
commit8016d51a3bbd410b0b927ed66be50a09574b7982 (patch)
tree79850e25e55e9ef5d69272a0b67d0abd72c977d1 /xlators/mgmt/glusterd/src/glusterd-shd-svc.c
parent08d502c3b05c6f7831bb4cc764bd458b405a99b1 (diff)
afr: add client-pid to all gf_event() calls
client-pid for glustershd is GF_CLIENT_PID_SELF_HEALD client-pid for glfsheal is GF_CLIENT_PID_GLFS_HEALD updates: bz#1689250 Change-Id: Ib3a863af160ff48c822a5e6b0c27c575c9887470 Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-shd-svc.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-shd-svc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-shd-svc.c b/xlators/mgmt/glusterd/src/glusterd-shd-svc.c
index 69e27cbf4dc..f5379b0270b 100644
--- a/xlators/mgmt/glusterd/src/glusterd-shd-svc.c
+++ b/xlators/mgmt/glusterd/src/glusterd-shd-svc.c
@@ -147,6 +147,7 @@ glusterd_shdsvc_start(glusterd_svc_t *svc, int flags)
{
int ret = -1;
char glusterd_uuid_option[PATH_MAX] = {0};
+ char client_pid[32] = {0};
dict_t *cmdline = NULL;
cmdline = dict_new();
@@ -158,6 +159,15 @@ glusterd_shdsvc_start(glusterd_svc_t *svc, int flags)
if (ret < 0)
goto out;
+ ret = snprintf(client_pid, sizeof(client_pid), "--client-pid=%d",
+ GF_CLIENT_PID_SELF_HEALD);
+ if (ret < 0)
+ goto out;
+
+ ret = dict_set_str(cmdline, "arg", client_pid);
+ if (ret < 0)
+ goto out;
+
/* Pass cmdline arguments as key-value pair. The key is merely
* a carrier and is not used. Since dictionary follows LIFO the value
* should be put in reverse order*/