Esempio n. 1
0
 def verify_revid(self):
     missing_keys = False
     src_node = self.get_active_vb0_node(self.src_master)
     dest_node = self.get_active_vb0_node(self.dest_master)
     src_client = MemcachedClient(src_node.ip, 11210)
     dest_client = MemcachedClient(dest_node.ip, 11210)
     src_client.sasl_auth_plain("cbadminbucket", "password")
     src_client.bucket_select("default")
     dest_client.sasl_auth_plain("cbadminbucket", "password")
     dest_client.bucket_select("default")
     for key in self.keys_loaded:
         try:
             src_meta = src_client.getMeta(key)
             dest_meta = dest_client.getMeta(key)
             self.log.info("deleted, flags, exp, rev_id, cas for key from Source({0}) {1} = {2}"
                            .format(src_node.ip, key, src_meta))
             self.log.info("deleted, flags, exp, rev_id, cas for key from Destination({0}) {1} = {2}"
                            .format(dest_node.ip, key, dest_meta))
             if src_meta == dest_meta:
                 self.log.info("RevID verification successful for key {0}".format(key))
             else:
                 self.fail("RevID verification failed for key {0}".format(key))
         except MemcachedError as e:
             self.log.error("Key {0} threw {1} on getMeta()".format(key, e))
             missing_keys = True
     if missing_keys:
         self.fail("Some keys are missing at destination")
Esempio n. 2
0
 def verify_revid(self):
     missing_keys = False
     src_node = self.get_active_vb0_node(self.src_master)
     dest_node = self.get_active_vb0_node(self.dest_master)
     src_client = MemcachedClient(src_node.ip, 11210)
     dest_client = MemcachedClient(dest_node.ip, 11210)
     src_client.sasl_auth_plain("cbadminbucket","password")
     src_client.bucket_select("default")
     dest_client.sasl_auth_plain("cbadminbucket","password")
     dest_client.bucket_select("default")
     for key in self.keys_loaded:
         try:
             src_meta = src_client.getMeta(key)
             dest_meta = dest_client.getMeta(key)
             self.log.info("deleted, flags, exp, rev_id, cas for key from Source({0}) {1} = {2}"
                            .format(src_node.ip, key, src_meta))
             self.log.info("deleted, flags, exp, rev_id, cas for key from Destination({0}) {1} = {2}"
                            .format(dest_node.ip, key, dest_meta))
             if src_meta == dest_meta:
                 self.log.info("RevID verification successful for key {0}".format(key))
             else:
                 self.fail("RevID verification failed for key {0}".format(key))
         except MemcachedError as e:
             self.log.error("Key {0} threw {1} on getMeta()".format(key, e))
             missing_keys = True
     if missing_keys:
         self.fail("Some keys are missing at destination")
Esempio n. 3
0
 def verify_revid(self):
     missing_keys = False
     src_node = self.get_active_vb0_node(self.src_master)
     dest_node = self.get_active_vb0_node(self.dest_master)
     src_client = MemcachedClient(src_node.ip, 11210)
     dest_client = MemcachedClient(dest_node.ip, 11210)
     for key in self.keys_loaded:
         try:
             src_meta = src_client.getMeta(key)
             dest_meta = dest_client.getMeta(key)
             self.log.info(
                 "deleted, flags, exp, rev_id, cas for key from Source({0}) {1} = {2}"
                 .format(src_node.ip, key, src_meta))
             self.log.info(
                 "deleted, flags, exp, rev_id, cas for key from Destination({0}) {1} = {2}"
                 .format(dest_node.ip, key, dest_meta))
             if src_meta == dest_meta:
                 self.log.info(
                     "RevID verification successful for key {}".format(key))
             else:
                 self.fail(
                     "RevID verification failed for key {}".format(key))
         except MemcachedError:
             self.log.error("Key {} is missing at destination".format(key))
             missing_keys = True
     if missing_keys:
         self.fail("Some keys are missing at destination")
Esempio n. 4
0
 def verify_revid(self):
     missing_keys = False
     src_node = self.get_active_vb0_node(self.src_master)
     dest_node = self.get_active_vb0_node(self.dest_master)
     src_client = MemcachedClient(src_node.ip, 11210)
     dest_client = MemcachedClient(dest_node.ip, 11210)
     for key in self.keys_loaded:
         try:
             src_meta = src_client.getMeta(key)
             dest_meta = dest_client.getMeta(key)
             self.log.info("deleted, flags, exp, rev_id, cas for key from Source({0}) {1} = {2}"
                            .format(src_node.ip, key, src_meta))
             self.log.info("deleted, flags, exp, rev_id, cas for key from Destination({0}) {1} = {2}"
                            .format(dest_node.ip, key, dest_meta))
             if src_meta == dest_meta:
                 self.log.info("RevID verification successful for key {}".format(key))
             else:
                 self.fail("RevID verification failed for key {}".format(key))
         except MemcachedError:
             self.log.error("Key {} is missing at destination".format(key))
             missing_keys = True
     if missing_keys:
         self.fail("Some keys are missing at destination")
 def load_one_mutation_into_source_vb0(self, vb0_active_src_node):
     key = self.vb0_keys[self.key_counter]
     memc_client = MemcachedClient(vb0_active_src_node.ip, 11210)
     try:
         memc_client.set(key, exp=0, flags=0, val="dummy val")
         self.key_counter += 1
         self.keys_loaded.append(key)
         self.log.info("Loaded key {0} onto vb0 in {1}".format(
             key, vb0_active_src_node.ip))
         self.log.info(
             "deleted, flags, exp, rev_id, cas for key {0} = {1}".format(
                 key, memc_client.getMeta(key)))
     except MemcachedError as e:
         self.log.error(e)
Esempio n. 6
0
 def load_one_mutation_into_source_vb0(self, vb0_active_src_node):
     key = self.vb0_keys[self.key_counter]
     memc_client = MemcachedClient(vb0_active_src_node.ip, 11210)
     try:
         memc_client.set(key, exp=0, flags=0, val="dummy val")
         self.key_counter += 1
         self.keys_loaded.append(key)
         self.log.info("Loaded key {} onto vb0 in {}".format(key, vb0_active_src_node.ip))
         self.log.info ("deleted, flags, exp, rev_id, cas for key {} = {}".format(key, memc_client.getMeta(key)))
     except MemcachedError as e:
         self.log.error(e)
Esempio n. 7
0
 def load_one_mutation_into_source_vb0(self, vb0_active_src_node):
     key = self.vb0_keys[self.key_counter]
     memc_client = MemcachedClient(vb0_active_src_node.ip, 11210)
     memc_client.sasl_auth_plain("cbadminbucket","password")
     memc_client.bucket_select("default")
     try:
         memc_client.set(key, exp=0, flags=0, val="dummy val")
         self.key_counter += 1
         self.keys_loaded.append(key)
         self.log.info("Loaded key {0} onto vb0 in {1}".format(key, vb0_active_src_node.ip))
         self.log.info ("deleted, flags, exp, rev_id, cas for key {0} = {1}".format(key, memc_client.getMeta(key)))
     except MemcachedError as e:
         self.log.error(e)