<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hi All,</tt><tt><br>
</tt><tt><br>
</tt><tt>We are trying to implement pause/resume feature for
GlusterFS geo-replication, which will be used before taking
GlusterFS snapshot.(pause geo-rep, take snapshot, resume geo-rep)</tt><tt><br>
</tt><tt><br>
</tt><tt>Geo-replication involves </tt><tt><br>
</tt><tt>1. </tt><tt>crawling(xtime based and changelog based)</tt><tt>
and identifying changes</tt><tt><br>
</tt><tt>2. Processing changes and queue for </tt><tt><br>
</tt><tt> a) </tt><tt>Entry operations on slave to keep same
GFID on replicated files.</tt><tt><br>
</tt><tt> b) Rsync or tarssh to sync files to slave.</tt><tt><br>
</tt><tt><br>
</tt><tt>As of now the idea is to stop processing on receiving pause
signal(entry ops and rsync will stop eventually since processing
is stopped) but crawling and identifying changes will continue.
Sent initial patch(<a class="moz-txt-link-freetext" href="http://review.gluster.org/#/c/7322/">http://review.gluster.org/#/c/7322/</a>) for the
same</tt><tt>.</tt><tt><br>
</tt><tt><br>
</tt><i><tt>Plan:</tt></i><tt><br>
</tt><tt>gluster cli will send SIGUSR1 to geo-rep monitor process,
then monitor will send SIGUSR1 to all the worker processes.</tt><tt><br>
</tt><tt>Worker processes uses os.pipe() and select to handle the
signal received </tt><tt>from monitor.</tt><tt><br>
</tt><tt><br>
</tt><i><tt>Problem:</tt></i><tt><br>
</tt><tt>Signal handling is not working in monitor. (No
error/traceback)</tt><tt>, looks like python's
limitation(<a class="moz-txt-link-freetext" href="http://bugs.python.org/issue5315">http://bugs.python.org/issue5315</a>)<br>
</tt><i><tt><br>
</tt></i><i><tt>Alternate solution(Involves lot of changes in
existing geo-rep code):</tt></i><tt><br>
</tt><tt>Moving crawling as separate process(outside the monitor
process group), glustercli pids SIGSTOP to monitor pid group to
pause and SIGCONT to monitor pid group to Resume.</tt><tt><br>
</tt><tt><br>
</tt><tt>Please suggest what can be done to effectively handle
signal or pause/resume.</tt><tt><br>
</tt><tt><br>
</tt><tt>--</tt><tt><br>
</tt><tt>regards</tt><tt><br>
</tt><tt>Aravinda</tt><tt><br>
</tt><tt><br>
</tt><tt><br>
</tt>
</body>
</html>