Skip to content

Commit

Permalink
feat(dbm-services): 调整一主多从流程参数适配saas、前端 TencentBlueKing#7234
Browse files Browse the repository at this point in the history
  • Loading branch information
ymakedaq committed Oct 22, 2024
1 parent e67ba3d commit 57ad9d1
Show file tree
Hide file tree
Showing 6 changed files with 540 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,10 @@ def master_and_slave_switch(root_id: str, ticket_data: dict, cluster: Cluster, c
mysql_storage_slave = cluster.storageinstance_set.filter(
instance_inner_role=InstanceInnerRole.SLAVE.value, status=InstanceStatus.RUNNING.value
)
cluster_info["other_slave_info"] = [
y.machine.ip for y in mysql_storage_slave.exclude(machine__ip=cluster_info["old_slave_ip"])
]
exclude_ips = [cluster_info["old_slave_ip"]]
if cluster_info.get("old_ro_slave_ips"):
exclude_ips.extend(cluster_info["old_ro_slave_ips"])
cluster_info["other_slave_info"] = [y.machine.ip for y in mysql_storage_slave.exclude(machine__ip__in=exclude_ips)]
domain_map = get_tendb_ha_entry(cluster.id)
cluster_info["master_domain"] = domain_map["master_domain"]
cluster_info["slave_domain"] = domain_map["slave_domain"]
Expand Down
Loading

0 comments on commit 57ad9d1

Please sign in to comment.