diff options
author | hari gowtham <hgowtham@redhat.com> | 2016-07-12 16:40:28 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2017-01-16 20:49:47 -0800 |
commit | 3263d1c4f4b7efd1a018c17e1ba4dd9245094f48 (patch) | |
tree | dc1ca7a0236244ccd4dc4d8cd157afe8e543f6f7 /rpc | |
parent | 514522d12e15e5632a0ff89785618b37dad7f5dd (diff) |
tier : Tier as a service
tierd is implemented by separating from rebalance process.
The commands affected:
1) Attach tier will trigger this process instead of old one
2) tier start and tier start force will also trigger this process.
3) volume status [tier] will show tier daemon as a process instead
of task and normal tier status and tier detach status works.
4) tier stop implemented.
5) detach tier implemented separately along with new detach tier
status
6) volume tier volname status will work using the changes.
7) volume set works
This patch has separated the tier translator from the legacy
DHT rebalance code. It now sends the RPCs from the CLI
to glusterd separate to the DHT rebalance code.
The daemon is now a service, similar to the snapshot daemon,
and can be viewed using the volume status command.
The code for the validation and commit phase are the same
as the earlier tier validation code in DHT rebalance.
The “brickop” phase has been changed so that the status
command can use this framework.
The service management framework is now used.
DHT rebalance does not use this framework.
This service framework takes care of :
*) spawning the daemon, killing it and other such processes.
*) volume set options , which are written on the volfile.
*) restart and reconfigure functions. Restart is to restart
the daemon at two points
1)after gluster goes down and comes up.
2) to stop detach tier.
*) reconfigure is used to make immediate volfile changes.
By doing this, we don’t restart the daemon.
it has the code to rewrite the volfile for topological
changes too (which comes into place during add and remove brick).
With this patch the log, pid, and volfile are separated
and put into respective directories.
Change-Id: I3681d0d66894714b55aa02ca2a30ac000362a399
BUG: 1313838
Signed-off-by: hari gowtham <hgowtham@redhat.com>
Reviewed-on: http://review.gluster.org/13365
Smoke: Gluster Build System <jenkins@build.gluster.org>
Tested-by: hari gowtham <hari.gowtham005@gmail.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/rpc-lib/src/protocol-common.h | 2 | ||||
-rw-r--r-- | rpc/xdr/src/cli1-xdr.x | 13 |
2 files changed, 11 insertions, 4 deletions
diff --git a/rpc/rpc-lib/src/protocol-common.h b/rpc/rpc-lib/src/protocol-common.h index c5d14e8667f..89a7bb0bcde 100644 --- a/rpc/rpc-lib/src/protocol-common.h +++ b/rpc/rpc-lib/src/protocol-common.h @@ -195,10 +195,10 @@ enum gluster_cli_procnum { GLUSTER_CLI_GANESHA, GLUSTER_CLI_BITROT, GLUSTER_CLI_ATTACH_TIER, - GLUSTER_CLI_DETACH_TIER, GLUSTER_CLI_TIER, GLUSTER_CLI_GET_STATE, GLUSTER_CLI_RESET_BRICK, + GLUSTER_CLI_REMOVE_TIER_BRICK, GLUSTER_CLI_MAXVALUE, }; diff --git a/rpc/xdr/src/cli1-xdr.x b/rpc/xdr/src/cli1-xdr.x index c2d26a9ebcd..8a64351c974 100644 --- a/rpc/xdr/src/cli1-xdr.x +++ b/rpc/xdr/src/cli1-xdr.x @@ -25,7 +25,13 @@ GF_DEFRAG_CMD_STOP_DETACH_TIER, GF_DEFRAG_CMD_PAUSE_TIER, GF_DEFRAG_CMD_RESUME_TIER, - GF_DEFRAG_CMD_DETACH_STATUS + GF_DEFRAG_CMD_DETACH_STATUS, + GF_DEFRAG_CMD_STOP_TIER, + GF_DEFRAG_CMD_DETACH_START, + GF_DEFRAG_CMD_DETACH_COMMIT, + GF_DEFRAG_CMD_DETACH_COMMIT_FORCE, + GF_DEFRAG_CMD_DETACH_STOP, + GF_DEFRAG_CMD_TYPE_MAX }; enum gf_defrag_status_t { @@ -41,7 +47,7 @@ GF_DEFRAG_STATUS_MAX }; - enum gf1_cluster_type { +enum gf1_cluster_type { GF_CLUSTER_TYPE_NONE = 0, GF_CLUSTER_TYPE_STRIPE, GF_CLUSTER_TYPE_REPLICATE, @@ -177,7 +183,8 @@ enum gf_cli_status_type { GF_CLI_STATUS_QUOTAD = 0x002000, /*00010000000000000*/ GF_CLI_STATUS_SNAPD = 0x004000, /*00100000000000000*/ GF_CLI_STATUS_BITD = 0x008000, /*01000000000000000*/ - GF_CLI_STATUS_SCRUB = 0x010000 /*10000000000000000*/ + GF_CLI_STATUS_SCRUB = 0x010000, /*10000000000000000*/ + GF_CLI_STATUS_TIERD = 0x020000 /*100000000000000000*/ }; /* Identifiers for snapshot clis */ |