From 3d4a31d304064f88d2d1e414346c790f099743b5 Mon Sep 17 00:00:00 2001 From: Avra Sengupta Date: Wed, 29 Jan 2014 03:06:19 +0000 Subject: glusterd/geo-rep: Looks for state_file and pid-file in gsyncd_template.conf If entries like state_file or pid-file are missing in the gsyncd.conf or if the gsyncd.conf is also missing, glusterd looks for the missing configs in the gsyncd_template.conf status will display "Config Corrupted" as long as the entry is missing in the config file. Missing state-file entry in both config and template will not allow starting a geo-rep session. However stop force will successfully stop an already running session, if the state-file entries are missing in both the config file and the template, as long as either of them have a pid-file entry. if the pid-file entry is missing in the gsyncd.conf file, starting a geo-rep session will not be allowed. if the pid-file entry is missing in an already started session, then stop force will fetch it from the config template and stop the session. if the pid-file entry is missing in both the config and the template, stop force will fail with appropriate error stating pid-file entry is missing. Change-Id: I81d7cbc4af085d82895bbef46ca732555aa5365d BUG: 1059092 Signed-off-by: Avra Sengupta Reviewed-on: http://review.gluster.org/6856 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/mgmt/glusterd/src/glusterd-utils.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.h') diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.h b/xlators/mgmt/glusterd/src/glusterd-utils.h index 84fa89b0e2d..2d1afc379a8 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.h +++ b/xlators/mgmt/glusterd/src/glusterd-utils.h @@ -633,11 +633,16 @@ glusterd_get_slave_info (char *slave, char **slave_ip, int glusterd_get_statefile_name (glusterd_volinfo_t *volinfo, char *slave, - char *conf_path, char **statefile); + char *conf_path, char **statefile, + gf_boolean_t *is_template_in_use); int glusterd_gsync_read_frm_status (char *path, char *buf, size_t blen); +int +glusterd_create_status_file (char *master, char *slave, char *slave_ip, + char *slave_vol, char *status); + int glusterd_check_restart_gsync_session (glusterd_volinfo_t *volinfo, char *slave, dict_t *resp_dict, char *path_list, -- cgit