Skip to content

Commit

Permalink
123
Browse files Browse the repository at this point in the history
  • Loading branch information
ymakedaq committed Sep 27, 2024
1 parent 65e10f4 commit 70a21f7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,24 +85,24 @@ def destroy(self):
cluster_class = Cluster.objects.get(id=cluster_ids[0])
ports = get_ports(cluster_ids)
slave_ins_list = StorageInstance.objects.filter(machine__ip=slave_ip)

for slave_ins in slave_ins_list:
if slave_ins.is_stand_by:
raise DBMetaException(message=_("{}:{}实例是standby slave,请确认").format(slave_ip, slave_ins.port))

p = Builder(
root_id=self.root_id,
data=copy.deepcopy(self.ticket_data),
need_random_pass_cluster_ids=list(set(cluster_ids)),
)
cluster_info = {"uninstall_ip": slave_ip, "cluster_ids": cluster_ids}

p.add_act(
act_name=_("卸载实例前先删除元数据"),
act_component_code=MySQLDBMetaComponent.code,
kwargs=asdict(
DBMetaOPKwargs(
db_meta_class_func=MySQLDBMeta.slave_recover_del_instance.__name__,
is_update_trans_data=True,
cluster=cluster_info,
cluster={"uninstall_ip": slave_ip, "cluster_ids": cluster_ids},
)
),
)
Expand Down Expand Up @@ -138,7 +138,7 @@ def destroy(self):
ports=ports,
)
)
p.run_pipeline(init_trans_data_class=ClusterInfoContext(), is_drop_random_user=False)
p.run_pipeline(is_drop_random_user=False)


class MySQLNonStandbySlavesUpgradeFlow(object):
Expand Down

0 comments on commit 70a21f7

Please sign in to comment.