diff options
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-quotad-svc.c | 2 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-rebalance.c | 1 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-shd-svc.c | 9 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-snapd-svc.c | 4 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-tierd-svc.c | 1 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 1 | ||||
-rwxr-xr-x | xlators/mount/fuse/utils/mount.glusterfs.in | 9 | ||||
-rwxr-xr-x | xlators/mount/fuse/utils/mount_glusterfs.in | 9 | ||||
-rw-r--r-- | xlators/protocol/client/src/client-handshake.c | 6 | ||||
-rw-r--r-- | xlators/protocol/server/src/server-handshake.c | 7 |
10 files changed, 48 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-quotad-svc.c b/xlators/mgmt/glusterd/src/glusterd-quotad-svc.c index e0eb38f494a..ac8694fc440 100644 --- a/xlators/mgmt/glusterd/src/glusterd-quotad-svc.c +++ b/xlators/mgmt/glusterd/src/glusterd-quotad-svc.c @@ -122,6 +122,8 @@ glusterd_quotadsvc_start (glusterd_svc_t *svc, int flags) dict_t *cmdline = NULL; char key[16] = {0}; char *options[] = { + svc->name, + "--process-name", "*replicate*.entry-self-heal=off", "--xlator-option", "*replicate*.metadata-self-heal=off", diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c index 4c24b99d0b8..70b391e4188 100644 --- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c +++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c @@ -289,6 +289,7 @@ glusterd_handle_defrag_start (glusterd_volinfo_t *volinfo, char *op_errstr, "*replicate*.metadata-self-heal=off", "--xlator-option", "*replicate*.entry-self-heal=off", "--xlator-option", "*dht.readdir-optimize=on", + "--process-name", "rebalance", NULL); if (volinfo->type == GF_CLUSTER_TYPE_TIER) { diff --git a/xlators/mgmt/glusterd/src/glusterd-shd-svc.c b/xlators/mgmt/glusterd/src/glusterd-shd-svc.c index e0135ea2be3..8716a0bd10b 100644 --- a/xlators/mgmt/glusterd/src/glusterd-shd-svc.c +++ b/xlators/mgmt/glusterd/src/glusterd-shd-svc.c @@ -17,6 +17,7 @@ #include "glusterd-shd-svc.h" #include "glusterd-svc-helper.h" +#define GD_SHD_PROCESS_NAME "--process-name" char *shd_svc_name = "glustershd"; void @@ -162,6 +163,14 @@ glusterd_shdsvc_start (glusterd_svc_t *svc, int flags) /* 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*/ + ret = dict_set_str (cmdline, "arg4", svc->name); + if (ret) + goto out; + + ret = dict_set_str (cmdline, "arg3", GD_SHD_PROCESS_NAME); + if (ret) + goto out; + ret = dict_set_str (cmdline, "arg2", glusterd_uuid_option); if (ret) goto out; diff --git a/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c b/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c index 59d8fbdfa6a..ea56d8012aa 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c @@ -297,7 +297,9 @@ glusterd_snapdsvc_start (glusterd_svc_t *svc, int flags) "-p", svc->proc.pidfile, "-l", svc->proc.logfile, "--brick-name", snapd_id, - "-S", svc->conn.sockpath, NULL); + "-S", svc->conn.sockpath, + "--process-name", svc->name, + NULL); snapd_port = pmap_assign_port (THIS, volinfo->snapd.port, snapd_id); volinfo->snapd.port = snapd_port; diff --git a/xlators/mgmt/glusterd/src/glusterd-tierd-svc.c b/xlators/mgmt/glusterd/src/glusterd-tierd-svc.c index c75b378140c..bb2cbff6e93 100644 --- a/xlators/mgmt/glusterd/src/glusterd-tierd-svc.c +++ b/xlators/mgmt/glusterd/src/glusterd-tierd-svc.c @@ -330,6 +330,7 @@ glusterd_tierdsvc_start (glusterd_svc_t *svc, int flags) "--xlator-option", "*dht.readdir-optimize=on", "--xlator-option", "*tier-dht.xattr-name=trusted.tier.tier-dht", + "--process-name", svc->name, NULL); diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index ee3498f3e86..9e98225e73e 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -2060,6 +2060,7 @@ retry: "--brick-name", brickinfo->path, "-l", brickinfo->logfile, "--xlator-option", glusterd_uuid, + "--process-name", "brick", NULL); if (dict_get_str (priv->opts, GLUSTERD_LOCALTIME_LOGGING_KEY, diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in index 826991ba402..216d03c4182 100755 --- a/xlators/mount/fuse/utils/mount.glusterfs.in +++ b/xlators/mount/fuse/utils/mount.glusterfs.in @@ -257,6 +257,12 @@ start_glusterfs () cmd_line=$(echo "$cmd_line --xlator-option=$xlator_option"); fi + if [ -n "$process_name" ]; then + cmd_line=$(echo "$cmd_line --process-name fuse.$process_name"); + else + cmd_line=$(echo "$cmd_line --process-name fuse"); + fi + # if trasnport type is specified, we have to append it to # volume name, so that it fetches the right client vol file @@ -510,6 +516,9 @@ with_options() "halo-min-replicas") halo_min_replicas=$value ;; + "process-name") + process_name=$value + ;; x-*) # comments or userspace application-specific options, drop them ;; diff --git a/xlators/mount/fuse/utils/mount_glusterfs.in b/xlators/mount/fuse/utils/mount_glusterfs.in index eca84557e87..d3571dea706 100755 --- a/xlators/mount/fuse/utils/mount_glusterfs.in +++ b/xlators/mount/fuse/utils/mount_glusterfs.in @@ -234,6 +234,12 @@ start_glusterfs () cmd_line=$(echo "$cmd_line --xlator-option=$xlator_option"); fi + if [ -n "$process_name" ]; then + cmd_line=$(echo "$cmd_line --process-name fuse.$process_name"); + else + cmd_line=$(echo "$cmd_line --process-name fuse"); + fi + # for rdma volume, we have to fetch volfile with '.rdma' added # to volume name, so that it fetches the right client vol file volume_id_rdma=""; @@ -398,6 +404,9 @@ with_options() [ $value = "false" ] ; then no_root_squash=1; fi ;; + "process-name") + process_name=$value + ;; *) warn "Invalid option: $key" exit 1 diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c index b6dc0797dd9..cd71c2c34a2 100644 --- a/xlators/protocol/client/src/client-handshake.c +++ b/xlators/protocol/client/src/client-handshake.c @@ -1360,6 +1360,12 @@ client_setvolume (xlator_t *this, struct rpc_clnt *rpc) goto fail; } + ret = dict_set_str (options, "process-name", this->ctx->cmd_args.process_name); + if (ret < 0) { + gf_msg (this->name, GF_LOG_INFO, 0, PC_MSG_DICT_SET_FAILED, + "failed to set process-name in handshake msg"); + } + ret = dict_set_str (options, "client-version", PACKAGE_VERSION); if (ret < 0) { gf_msg (this->name, GF_LOG_WARNING, 0, PC_MSG_DICT_SET_FAILED, diff --git a/xlators/protocol/server/src/server-handshake.c b/xlators/protocol/server/src/server-handshake.c index fa2f61315df..6dc9a38aa71 100644 --- a/xlators/protocol/server/src/server-handshake.c +++ b/xlators/protocol/server/src/server-handshake.c @@ -475,6 +475,7 @@ server_setvolume (rpcsvc_request_t *req) glusterfs_ctx_t *ctx = NULL; struct _child_status *tmp = NULL; char *subdir_mount = NULL; + char *client_name = NULL; params = dict_new (); reply = dict_new (); @@ -609,6 +610,10 @@ server_setvolume (rpcsvc_request_t *req) if (ret < 0) { /* Not a problem at all as the key is optional */ } + ret = dict_get_str (params, "process-name", &client_name); + if (ret < 0) { + client_name = "unknown"; + } /*lk_verion :: [1..2^31-1]*/ ret = dict_get_uint32 (params, "clnt-lk-version", &lk_version); @@ -631,6 +636,8 @@ server_setvolume (rpcsvc_request_t *req) goto fail; } + client->client_name = gf_strdup(client_name); + gf_msg_debug (this->name, 0, "Connected to %s", client->client_uid); cancelled = server_cancel_grace_timer (this, client); if (cancelled)//Do gf_client_put on behalf of grace-timer-handler. |