def slave_mysql_data_lost(self):
     ha = HAInstance()
     ha.create()
     self._failover_test(ha.group_id, ha.dbslave_id, 
                         mysql_data_lost=True, 
                         mysqld_killed = True, 
                         check_rpl_consist=True)
 def slave_remove_tmp_init(self):
     ha = HAInstance()
     ha.create()        
     self._failover_test(ha.group_id, ha.dbslave_id, 
                         remove_tmp_initsql=True, 
                         mysqld_killed = True, 
                         check_rpl_consist=True)
 def master_killmysqld_binlogs(self):
     ha = HAInstance()
     ha.create()        
     self._failover_test(ha.group_id, ha.inst_id, mysqld_killed=True, 
                         check_vip=False, check_rpl_consist=False, check_binlog_range=True)
             
     self._failover_test(ha.group_id, ha.inst_id, mysqld_killed=True, 
                         check_vip=False, check_rpl_consist=False, check_binlog_range=True)
 def test_suite_smoke(self):
     ha = HAInstance()
     ha.create()
     self._failover_test(ha.group_id, ha.dbslave_id, do_workload=False, do_prepare=False, 
                       mysqld_killed=True, host_rebooted=False, check_vip=False, check_rpl_consist=True)
     
     ha.create()
     self._failover_test(ha.group_id, ha.inst_id, do_workload=False, do_prepare=False, 
                       mysqld_killed=False, host_rebooted=True, check_vip=False, check_rpl_consist=True)
Esempio n. 5
0
 def upgradeha(self,instance_id=None):
     self.inst_id = instance_id
     if not self.inst_id:
         self.inst_id = utils.get_instance_id_bytenant(DBInstanceType.SINGLE)
     self.group_id = utils.get_instance(self.inst_id).group_id
     
     utils.upgrade_ha_byclient(self.inst_id)
     utils.check_server_status(self.inst_id, expected_task=utils.tasks.InstanceTasks.NONE,
                               type=DBInstanceType.MASTER,
                               expected_svr_status=utils.ServiceStatuses.RUNNING,
                               deleted=False)
     _ha = HAInstance()
     _ha.create()
 def slave_reboothost(self):
     ha = HAInstance()
     ha.create()        
     self._failover_test(ha.group_id, ha.dbslave_id, host_rebooted=True, check_vip=False, check_rpl_consist=True)
 def slave_killmysqld(self):
     ha = HAInstance()
     ha.create()        
     self._failover_test(ha.group_id, ha.dbslave_id, mysqld_killed=True, check_vip=False, check_rpl_consist=True)
 def master_fake_die(self):
     ha = HAInstance()
     ha.create()
     self._failover_test(ha.group_id, ha.inst_id, mysqld_killed=False, check_vip=False, check_rpl_consist=True)