]> git-server-git.apps.pok.os.sepia.ceph.com Git - radosgw-agent.git/commitdiff
Adds data sync capabilities to test server 1/head
authorChristophe Courtaut <christophe.courtaut@gmail.com>
Mon, 23 Sep 2013 14:25:25 +0000 (16:25 +0200)
committerChristophe Courtaut <christophe.courtaut@gmail.com>
Mon, 23 Sep 2013 14:25:25 +0000 (16:25 +0200)
radosgw_agent/cli.py

index 9732f4ce5ef67f670ee9f83f66918511b2b686cc..00e51e3d04b74781dd1f00c8b9bcb8a700fa366f 100644 (file)
@@ -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