Bug 764476 (GLUSTER-2744)

Summary: make geo-replication package friendly
Product: [Community] GlusterFS Reporter: Anand Avati <aavati>
Component: geo-replicationAssignee: kaushik <kbudiger>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: mainlineCC: chrisw, gluster-bugs, jdarcy, rahulcs
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: RTNR Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Anand Avati 2011-04-13 11:21:10 UTC
Tracker for changes in geo-replication code to permit (as) friendly (as possible) separation of geo-replication into a separate RPM - to express python dependency only if geo-replication is needed.

Avati

Comment 1 Anand Avati 2011-04-15 08:28:45 UTC
PATCH: http://patches.gluster.com/patch/6897 in master (rpm : create new package for geo-replication and preserve symlinks)

Comment 2 Anand Avati 2011-04-22 07:52:26 UTC
PATCH: http://patches.gluster.com/patch/7021 in master (cli: changes in struct cli_cmd to disable gluster command at run-time)

Comment 3 Anand Avati 2011-04-22 07:52:30 UTC
PATCH: http://patches.gluster.com/patch/7022 in master (cli: check if gsyncd is present in the configured place, enable geo-replication if present)

Comment 4 Anand Avati 2011-04-22 08:04:16 UTC
PATCH: http://patches.gluster.com/patch/7027 in master (mgmt/glusterd: fixup for the previous commits(BUG 2744), to disable commands at run-time)

Comment 5 Csaba Henk 2011-07-07 21:38:39 UTC
Detection of the non-presence of geo-rep stuff needs some refinement. Now that I accidentally made a syntax error in gsyncd, I get upon glusterd start:

---------------
[2011-07-07 17:10:03.787534] I [glusterd.c:97:glusterd_uuid_init] 0-glusterd: generated UUID: ed2e7169-7fa8-42aa-8a48-3124918d764b
Traceback (most recent call last):
  File "/meta/progs/glusterfs-git/usr/libexec/glusterfs/python/syncdaemon/gsyncd.py", line 19, in <module>
    import resource
  File "/meta/progs/glusterfs-git/usr/libexec/glusterfs/python/syncdaemon/resource.py", line 18, in <module>
    from master import GMaster
  File "/meta/progs/glusterfs-git/usr/libexec/glusterfs/python/syncdaemon/master.py", line 186
    should_display_info = self.start - self.lastreport['time'] >= 60:
                                                                    ^
SyntaxError: invalid syntax
[2011-07-07 17:10:04.574382] I [glusterd.c:294:glusterd_check_gsync_present] 0-: geo-replication module not installed in the system
---------------

No, this is not the right consequence. The right thing would be to abort glusterd because of a fatal error in the setup. You should proceed further with the conclusion that geo-rep is not installed only if execution of gsyncd fails; proceed with acknowledging the presence of geo-rep if the gsyncd test invocation succeeds _and_ you get back the proper version info. All the remaining cases are considered to be screwed up and be handled by aborting glusterd.

Practically, with run API you can check if the invocation failed due to exec issue by the retval of runner_start (and if the program was spawned successfully, then its exit status by the retval of runner_end).

Comment 6 Anand Avati 2011-09-12 10:20:16 UTC
CHANGE: http://review.gluster.com/317 (in lack of that, if geo-rep component is not installed, glusterd got a zombie child) merged in master by Vijay Bellur (vijay)

Comment 7 Anand Avati 2011-09-13 04:05:01 UTC
CHANGE: http://review.gluster.com/331 (Change-Id: Ic54220328f15c579dcf441de2aad8620751a97ef) merged in master by Vijay Bellur (vijay)

Comment 8 Anand Avati 2011-10-17 10:15:12 UTC
CHANGE: http://review.gluster.com/590 (Change-Id: I20d972e4930e65c4468d5da0ca75d60d2806bfa3) merged in release-3.2 by Vijay Bellur (vijay)

Comment 9 Anand Avati 2011-12-27 13:03:12 UTC
CHANGE: http://review.gluster.com/2505 (build: Change dependency of rsync version for geo-replication) merged in master by Vijay Bellur (vijay)