Skip to content

Commit

Permalink
fix(dbm-services): 从库多个域名切换失败 TencentBlueKing#7052
Browse files Browse the repository at this point in the history
  • Loading branch information
ymakedaq authored and zhangzhw8 committed Sep 24, 2024
1 parent 484463e commit 55596d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dbm-ui/backend/db_meta/api/cluster/tendbha/switch_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ def change_storage_cluster_entry(cluster_id: int, slave_ip: str, new_slave_ip: s
cluster = Cluster.objects.get(id=cluster_id)
slave_storage = cluster.storageinstance_set.get(machine__ip=slave_ip)
new_slave_storage = cluster.storageinstance_set.get(machine__ip=new_slave_ip)
slave_bind_entry = slave_storage.bind_entry.get()
slave_bind_entry.storageinstance_set.remove(slave_storage)
slave_bind_entry.storageinstance_set.add(new_slave_storage)
for be in slave_storage.bind_entry.all():
be.storageinstance_set.remove(slave_storage)
be.storageinstance_set.add(new_slave_storage)

0 comments on commit 55596d0

Please sign in to comment.