From: Christophe Courtaut Date: Mon, 23 Sep 2013 14:25:25 +0000 (+0200) Subject: Adds data sync capabilities to test server X-Git-Tag: v1.1~19^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1%2Fhead;p=radosgw-agent.git Adds data sync capabilities to test server --- diff --git a/radosgw_agent/cli.py b/radosgw_agent/cli.py index 9732f4c..00e51e3 100644 --- a/radosgw_agent/cli.py +++ b/radosgw_agent/cli.py @@ -194,6 +194,23 @@ class TestHandler(BaseHTTPRequestHandler): log.exception('error doing incremental metadata sync') status = 500 resp = str(e) + elif self.path.startswith('/data/full'): + try: + sync.DataSyncerFull('data', src, dest, args.daemon_id).sync(TestHandler.num_workers, + TestHandler.lock_timeout) + except Exception as e: + log.exception('error doing full data sync') + status = 500 + resp = str(e) + elif self.path.startswith('/data/incremental'): + try: + sync.DataSyncerInc('data', src, dest, args.daemon_id).sync(TestHandler.num_workers, + TestHandler.lock_timeout, + TestHandler.max_entries) + except Exception as e: + log.exception('error doing incremental data sync') + status = 500 + resp = str(e) else: log.warn('invalid request, ignoring') status = 400