diff options
author | Venky Shankar <venky@gluster.com> | 2011-10-24 15:29:00 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-11-04 02:06:44 -0700 |
commit | 8e171a03d81452a2998b01997da7647c0b3bf52b (patch) | |
tree | 54117831ec7c55fe0b1bb67f9ec227c5fe2059c6 /xlators/features/marker/utils/syncdaemon/resource.py | |
parent | cc0a908bc5d5046bcb2909fc98765038f15e918d (diff) |
cli: add geo-replication log-rotate command
Rotating geo-replication master/monitor log files from cli.
On invocation, the log file for a given master-slave session
is backed up with the current timestamp suffixed to the file
name and signal is sent to gsyncd to start logging to a new
log file.
Sample commands:
* Rotate log file for this <master>:<slave> session:
gluster volume geo-replication <master> <slave> log-rotate
* Rotate log files for all session for master volume <master>
gluster volume geo-replication <master> log-rotate
* Rotate log files for all sessions:
gluster volume geo-replication log-rotate
Change-Id: If801743e9f37bd282e68d262203141626ce77e55
BUG: 3519
Reviewed-on: http://review.gluster.com/653
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Csaba Henk <csaba@gluster.com>
Diffstat (limited to 'xlators/features/marker/utils/syncdaemon/resource.py')
-rw-r--r-- | xlators/features/marker/utils/syncdaemon/resource.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/resource.py b/xlators/features/marker/utils/syncdaemon/resource.py index 800d297ba..5f46edd44 100644 --- a/xlators/features/marker/utils/syncdaemon/resource.py +++ b/xlators/features/marker/utils/syncdaemon/resource.py @@ -6,7 +6,6 @@ import stat import time import errno import struct -import select import socket import logging import tempfile @@ -17,6 +16,7 @@ import repce from repce import RepceServer, RepceClient from master import GMaster import syncdutils +from syncdutils import select UrlRX = re.compile('\A(\w+)://(.*)') HostRX = re.compile('[a-z\d](?:[a-z\d.-]*[a-z\d])?', re.I) @@ -206,7 +206,7 @@ class SlaveLocal(object): logging.info("connection inactive for %d seconds, stopping" % int(gconf.timeout)) break else: - select.select((), (), ()) + select((), (), ()) class SlaveRemote(object): @@ -455,7 +455,7 @@ class SSH(AbstractUrl, SlaveRemote): i, o = ret inf = os.fdopen(i) repce.send(o, None, '__repce_version__') - select.select((inf,), (), ()) + select((inf,), (), ()) repce.recv(inf) # hack hack hack: store a global reference to the file # to save it from getting GC'd which implies closing it |