diff options
author | Saravanakumar Arumugam <sarumuga@redhat.com> | 2015-12-29 19:22:36 +0530 |
---|---|---|
committer | Aravinda VK <avishwan@redhat.com> | 2016-05-12 23:22:59 -0700 |
commit | a9128cda34b1f696b717ba09fa0ac5a929be8969 (patch) | |
tree | 4a8a1a59a4bd7d875382ee45e668c8eb94c5ca48 /xlators/mgmt/glusterd/src/glusterd-geo-rep.h | |
parent | 12d1c993660d6ae93b0fd08de9a6d7bb7431e7b0 (diff) |
glusterd/geo-rep: slave volume uuid to identify a geo-rep session
Problem:
Currently, it is possible to create multiple geo-rep session from
the Master host to Slave host(s), where Slave host(s) belonging
to the same volume.
For example:
Consider Master Host M1 having volume tv1 and Slave volume tv2,
which spans across two Slave hosts S1 and S2.
Currently, it is possible to create geo-rep session from
M1(tv1) to S1(tv2) as well as from M1(tv1) to S2(tv2).
When the Slave Host is alone modified, it is identified as a new geo-rep
session (as slave host and slave volume together are identifying
Slave side).
Also, it is possible to create both root and non-root geo-rep session between
same Master volume and Slave volume. This should also be avoided.
Solution:
This multiple geo-rep session creation must be avoided and
in order to avoid, use Slave volume uuid to identify a Slave.
This way, we can identify whether a session is already created for
the same Slave volume and avoid creating again (using different host).
When the session creation is forced in the above scenario, rename
the existing geo-rep session directory with new Slave Host mentioned.
Change-Id: I9239759cbc0d15dad63c48b8cf62950bb687c7c8
BUG: 1294813
Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com>
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/13111
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Tested-by: Kotresh HR <khiremat@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-geo-rep.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-geo-rep.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.h b/xlators/mgmt/glusterd/src/glusterd-geo-rep.h index 5568b5cf316..0524ec48fca 100644 --- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.h +++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.h @@ -14,6 +14,15 @@ #define GSYNC_CONF_TEMPLATE GEOREP"/gsyncd_template.conf" #endif +/* <slave host>::<slave volume> */ +#define SLAVE_URL_INFO_MAX (_POSIX_HOST_NAME_MAX + GD_VOLUME_NAME_MAX + 3) + +/* slave info format: + * <master host uuid>:ssh://{<slave_user>@}<slave host>::<slave volume> \ + * :<slave volume uuid> */ +#define VOLINFO_SLAVE_URL_MAX (_POSIX_LOGIN_NAME_MAX + (2*GF_UUID_BUF_SIZE) \ + + SLAVE_URL_INFO_MAX + 10) + typedef struct glusterd_gsync_status_temp { dict_t *rsp_dict; glusterd_volinfo_t *volinfo; |