Example #1
0
def teardown():
  if utils.options.skip_teardown:
    return

  teardown_procs = [
      shard_0_master.teardown_mysql(),
      shard_0_replica.teardown_mysql(),
      shard_1_master.teardown_mysql(),
      shard_1_replica.teardown_mysql(),
      shard_2_master.teardown_mysql(),
      shard_2_replica.teardown_mysql(),
      shard_3_master.teardown_mysql(),
      shard_3_replica.teardown_mysql(),
      ]
  utils.wait_procs(teardown_procs, raise_on_error=False)

  utils.zk_teardown()
  utils.kill_sub_processes()
  utils.remove_tmp_files()

  shard_0_master.remove_tree()
  shard_0_replica.remove_tree()
  shard_1_master.remove_tree()
  shard_1_replica.remove_tree()
  shard_2_master.remove_tree()
  shard_2_replica.remove_tree()
  shard_3_master.remove_tree()
  shard_3_replica.remove_tree()
Example #2
0
def teardown():
  if utils.options.skip_teardown:
    return

  teardown_procs = [
      tablet_62344.teardown_mysql(),
      tablet_62044.teardown_mysql(),
      tablet_41983.teardown_mysql(),
      tablet_31981.teardown_mysql(),
      ]
  utils.wait_procs(teardown_procs, raise_on_error=False)

  utils.zk_teardown()
  utils.kill_sub_processes()
  utils.remove_tmp_files()

  tablet_62344.remove_tree()
  tablet_62044.remove_tree()
  tablet_41983.remove_tree()
  tablet_31981.remove_tree()

  path = os.path.join(utils.vtdataroot, 'snapshot')
  try:
    shutil.rmtree(path)
  except OSError as e:
    if utils.options.verbose:
      print >> sys.stderr, e, path
Example #3
0
def tearDownModule():
  logging.debug("in tearDownModule")
  if utils.options.skip_teardown:
    return
  logging.debug("Tearing down the servers and setup")
  teardown_procs = [shard_0_master.teardown_mysql(),
                    shard_0_replica.teardown_mysql(),
                    shard_1_master.teardown_mysql(),
                    shard_1_replica.teardown_mysql(),
                   ]
  utils.wait_procs(teardown_procs, raise_on_error=False)

  utils.zk_teardown()
  shard_0_master.kill_vttablet()
  shard_0_replica.kill_vttablet()
  shard_1_master.kill_vttablet()
  shard_1_replica.kill_vttablet()

  utils.kill_sub_processes()
  utils.remove_tmp_files()

  shard_0_master.remove_tree()
  shard_0_replica.remove_tree()
  shard_1_master.remove_tree()
  shard_1_replica.remove_tree()
Example #4
0
def tearDownModule():
    if utils.options.skip_teardown:
        return

    teardown_procs = [
        shard_0_master.teardown_mysql(),
        shard_0_replica.teardown_mysql(),
        shard_1_master.teardown_mysql(),
        shard_1_slave1.teardown_mysql(),
        shard_1_slave2.teardown_mysql(),
        shard_2_master.teardown_mysql(),
        shard_2_replica1.teardown_mysql(),
        shard_2_replica2.teardown_mysql(),
        shard_3_master.teardown_mysql(),
        shard_3_replica.teardown_mysql(),
    ]
    utils.wait_procs(teardown_procs, raise_on_error=False)

    utils.zk_teardown()
    utils.kill_sub_processes()
    utils.remove_tmp_files()

    shard_0_master.remove_tree()
    shard_0_replica.remove_tree()
    shard_1_master.remove_tree()
    shard_1_slave1.remove_tree()
    shard_1_slave2.remove_tree()
    shard_2_master.remove_tree()
    shard_2_replica1.remove_tree()
    shard_2_replica2.remove_tree()
    shard_3_master.remove_tree()
    shard_3_replica.remove_tree()
Example #5
0
def tearDownModule():
    if utils.options.skip_teardown:
        return

    teardown_procs = [
        tablet_62344.teardown_mysql(),
        tablet_62044.teardown_mysql(),
        tablet_41983.teardown_mysql(),
        tablet_31981.teardown_mysql(),
    ]
    utils.wait_procs(teardown_procs, raise_on_error=False)

    if zkocc_server:
        utils.zkocc_kill(zkocc_server)
    utils.zk_teardown()
    utils.kill_sub_processes()
    utils.remove_tmp_files()

    tablet_62344.remove_tree()
    tablet_62044.remove_tree()
    tablet_41983.remove_tree()
    tablet_31981.remove_tree()

    path = os.path.join(environment.vtdataroot, 'snapshot')
    try:
        shutil.rmtree(path)
    except OSError as e:
        logging.debug("removing snapshot %s: %s", path, str(e))
Example #6
0
def tearDownModule():
  if utils.options.skip_teardown:
    return

  teardown_procs = [
      shard_0_master.teardown_mysql(),
      shard_0_replica1.teardown_mysql(),
      shard_0_replica2.teardown_mysql(),
      shard_0_rdonly.teardown_mysql(),
      shard_0_backup.teardown_mysql(),
      shard_1_master.teardown_mysql(),
      shard_1_replica1.teardown_mysql(),
      ]
  utils.wait_procs(teardown_procs, raise_on_error=False)

  utils.zk_teardown()
  utils.kill_sub_processes()
  utils.remove_tmp_files()

  shard_0_master.remove_tree()
  shard_0_replica1.remove_tree()
  shard_0_replica2.remove_tree()
  shard_0_rdonly.remove_tree()
  shard_0_backup.remove_tree()
  shard_1_master.remove_tree()
  shard_1_replica1.remove_tree()
Example #7
0
def tearDownModule():
  if utils.options.skip_teardown:
    return

  utils.zk_teardown()
  utils.kill_sub_processes()
  utils.remove_tmp_files()
Example #8
0
def teardown():
    if utils.options.skip_teardown:
        return

    teardown_procs = [
        shard_0_master.teardown_mysql(),
        shard_0_replica1.teardown_mysql(),
        shard_0_replica2.teardown_mysql(),
        shard_0_rdonly.teardown_mysql(),
        shard_0_backup.teardown_mysql(),
        shard_1_master.teardown_mysql(),
        shard_1_replica1.teardown_mysql(),
    ]
    utils.wait_procs(teardown_procs, raise_on_error=False)

    utils.zk_teardown()
    utils.kill_sub_processes()
    utils.remove_tmp_files()

    shard_0_master.remove_tree()
    shard_0_replica1.remove_tree()
    shard_0_replica2.remove_tree()
    shard_0_rdonly.remove_tree()
    shard_0_backup.remove_tree()
    shard_1_master.remove_tree()
    shard_1_replica1.remove_tree()
Example #9
0
def tearDownModule():
  if utils.options.skip_teardown:
    return

  teardown_procs = [
      tablet_62344.teardown_mysql(),
      tablet_62044.teardown_mysql(),
      tablet_41983.teardown_mysql(),
      tablet_31981.teardown_mysql(),
      ]
  utils.wait_procs(teardown_procs, raise_on_error=False)

  utils.zk_teardown()
  utils.kill_sub_processes()
  utils.remove_tmp_files()

  tablet_62344.remove_tree()
  tablet_62044.remove_tree()
  tablet_41983.remove_tree()
  tablet_31981.remove_tree()

  path = os.path.join(utils.vtdataroot, 'snapshot')
  try:
    shutil.rmtree(path)
  except OSError as e:
    logging.debug("removing snapshot %s: %s", path, str(e))
Example #10
0
def tearDownModule():
    if utils.options.skip_teardown:
        return

    utils.zk_teardown()
    utils.kill_sub_processes()
    utils.remove_tmp_files()
Example #11
0
 def tearDown(self):
     self.tablet.kill_vttablet()
     try:
         utils.wait_procs([self.tablet.teardown_mysql()])
     except:
         # FIXME: remove
         pass
     if getattr(self, "txlogger", None):
         self.txlogger.terminate()
     utils.zk_teardown()
     utils.kill_sub_processes()
     utils.remove_tmp_files()
Example #12
0
 def tearDown(self):
   self.tablet.kill_vttablet()
   try:
     utils.wait_procs([self.tablet.teardown_mysql()])
   except:
     # FIXME: remove
     pass
   if getattr(self, "txlogger", None):
     self.txlogger.terminate()
   utils.zk_teardown()
   utils.kill_sub_processes()
   utils.remove_tmp_files()
Example #13
0
def tearDownModule():
  if utils.options.skip_teardown:
    return

  teardown_procs = [t.teardown_mysql() for t in tablets]
  utils.wait_procs(teardown_procs, raise_on_error=False)

  utils.zk_teardown()
  utils.kill_sub_processes()
  utils.remove_tmp_files()

  for t in tablets:
    t.remove_tree()
Example #14
0
def tearDownModule():
    if utils.options.skip_teardown:
        return

    teardown_procs = [t.teardown_mysql() for t in tablets]
    utils.wait_procs(teardown_procs, raise_on_error=False)

    utils.zk_teardown()
    utils.kill_sub_processes()
    utils.remove_tmp_files()

    for t in tablets:
        t.remove_tree()
Example #15
0
def tearDownModule():
    if utils.options.skip_teardown:
        return
    logging.debug("Tearing down the servers and setup")
    teardown_procs = [master_tablet.teardown_mysql(), replica_tablet.teardown_mysql()]
    utils.wait_procs(teardown_procs, raise_on_error=False)

    utils.zk_teardown()
    utils.kill_sub_processes()
    utils.remove_tmp_files()
    master_tablet.kill_vttablet()
    replica_tablet.kill_vttablet()
    master_tablet.remove_tree()
    replica_tablet.remove_tree()
Example #16
0
def teardown():
  if utils.options.skip_teardown:
    return
  utils.debug("Tearing down the servers and setup")
  teardown_procs = [master_tablet.teardown_mysql(),
                    replica_tablet.teardown_mysql()]
  utils.wait_procs(teardown_procs, raise_on_error=False)

  utils.zk_teardown()
  utils.kill_sub_processes()
  utils.remove_tmp_files()
  master_tablet.kill_vttablet()
  replica_tablet.kill_vttablet()
  master_tablet.remove_tree()
  replica_tablet.remove_tree()
Example #17
0
def teardown():
  if utils.options.skip_teardown:
    return

  teardown_procs = [
      shard_0_master.teardown_mysql(),
      shard_0_slave.teardown_mysql(),
      ]
  utils.wait_procs(teardown_procs, raise_on_error=False)

  utils.zk_teardown()
  utils.kill_sub_processes()
  utils.remove_tmp_files()

  shard_0_master.remove_tree()
  shard_0_slave.remove_tree()
Example #18
0
 def tearDown(self):
   try:
     self.tablet.kill_vttablet()
   except AttributeError:
     print "Not killing vttablet - it wasn't running."
   try:
     utils.wait_procs([self.tablet.teardown_mysql()])
   except:
     # FIXME: remove
     pass
   if getattr(self, "txlogger", None):
     self.txlogger.terminate()
   utils.zk_teardown()
   utils.kill_sub_processes()
   utils.remove_tmp_files()
   # self.tablet.remove_tree()
   
   if getattr(self, "memcached", None):
     self.memcached.terminate()
Example #19
0
def tearDownModule():
  if utils.options.skip_teardown:
    return

  shard_0_master.kill_vttablet()
  shard_0_slave.kill_vttablet()

  teardown_procs = [
      shard_0_master.teardown_mysql(),
      shard_0_slave.teardown_mysql(),
      ]
  utils.wait_procs(teardown_procs, raise_on_error=False)

  utils.zk_teardown()
  utils.kill_sub_processes()
  utils.remove_tmp_files()

  shard_0_master.remove_tree()
  shard_0_slave.remove_tree()