Skip to content

Commit

Permalink
fix 123
Browse files Browse the repository at this point in the history
  • Loading branch information
ymakedaq committed Sep 25, 2024
1 parent ec4773c commit 977144b
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def non_standby_slaves_upgrade_subflow(
if backup_source == MySQLBackupSource.LOCAL:
local_backup = True
sync_data_sub_pipeline_list = build_sync_data_sub_pipelines(
root_id, parent_global_data, relation_cluster_ids, cluster, new_slave_ip, local_backup
root_id, parent_global_data, relation_cluster_ids, cluster, new_slave_ip, local_backup, charset
)
sub_pipeline.add_parallel_sub_pipeline(sync_data_sub_pipeline_list)

Expand Down Expand Up @@ -269,23 +269,23 @@ def build_install_sub_pipeline(


def build_sync_data_sub_pipelines(
root_id, parent_global_data, relation_cluster_ids, cluster, new_slave_ip, local_backup: bool
root_id, parent_global_data, relation_cluster_ids, new_slave_ip, local_backup: bool, charst: str
):
sync_data_sub_pipeline_list = []
for cluster_id in relation_cluster_ids:
cluster_model = Cluster.objects.get(id=cluster_id)
master = cluster_model.storageinstance_set.get(instance_inner_role=InstanceInnerRole.MASTER.value)
cluster_info = {
cluster = {
"mysql_port": master.port,
"cluster_id": cluster_model.id,
"cluster_type": cluster.cluster_type,
"cluster_type": cluster_model.cluster_type,
"master_ip": master.machine.ip,
"master_port": master.port,
"new_slave_ip": new_slave_ip,
"new_slave_port": master.port,
"bk_cloud_id": cluster_model.bk_cloud_id,
"file_target_path": f"/data/dbbak/{root_id}/{master.port}",
"charset": parent_global_data,
"charset": charst,
"change_master_force": True,
}
sync_data_sub_pipeline = SubBuilder(root_id=root_id, data=copy.deepcopy(parent_global_data))
Expand Down Expand Up @@ -323,7 +323,7 @@ def build_sync_data_sub_pipelines(
kwargs=asdict(
DBMetaOPKwargs(
db_meta_class_func=MySQLDBMeta.mysql_add_slave_info.__name__,
cluster=cluster_info,
cluster=cluster,
is_update_trans_data=True,
)
),
Expand Down

0 comments on commit 977144b

Please sign in to comment.