Skip to content

Commit

Permalink
fix(redis): 集群类型变更、分片变更支持redis_cluster集群 #6602
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemakeit authored and iSecloud committed Sep 2, 2024
1 parent 0807e08 commit ba1a79a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 2 additions & 0 deletions dbm-ui/backend/db_services/redis/redis_modules/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ def get_redis_moudles_detail(major_version: str, module_names: list = []) -> lis
"""
if not major_version:
return []
if not module_names:
return []
where = Q(major_version=major_version)
if module_names:
where = where & Q(module_name__in=module_names)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
)
from backend.db_services.redis.redis_dts.models import TbTendisDTSJob, TbTendisDtsTask
from backend.db_services.redis.redis_dts.util import get_safe_regex_pattern
from backend.db_services.redis.util import is_predixy_proxy_type, is_redis_cluster_protocal
from backend.db_services.redis.util import is_predixy_proxy_type, is_redis_cluster_protocal, is_twemproxy_proxy_type
from backend.flow.consts import GB, MB, StateType
from backend.flow.engine.bamboo.scene.redis.redis_cluster_data_check_repair import RedisClusterDataCheckRepairFlow
from backend.flow.engine.bamboo.scene.redis.redis_cluster_shutdown import RedisClusterShutdownFlow
Expand Down Expand Up @@ -949,13 +949,10 @@ def _execute(self, data, parent_data):
ticket_data["proxy_admin_pwd"] = ticket_data["proxy_pwd"]
self.log_info("NewDstClusterInstallJobAndWatchStatus ticket_data==>:{}".format(ticket_data))
root_id = generate_root_id()
if ticket_data["cluster_type"] == ClusterType.TendisPredixyTendisplusCluster.value:
if is_predixy_proxy_type(ticket_data["cluster_type"]):
flow = TendisPlusApplyFlow(root_id=root_id, data=ticket_data)
flow.deploy_predixy_cluster_flow()
elif ticket_data["cluster_type"] == ClusterType.TendisTwemproxyRedisInstance.value:
flow = RedisClusterApplyFlow(root_id=root_id, data=ticket_data)
flow.deploy_twemproxy_cluster_flow()
elif ticket_data["cluster_type"] == ClusterType.TwemproxyTendisSSDInstance.value:
elif is_twemproxy_proxy_type(ticket_data["cluster_type"]):
flow = RedisClusterApplyFlow(root_id=root_id, data=ticket_data)
flow.deploy_twemproxy_cluster_flow()
else:
Expand Down

0 comments on commit ba1a79a

Please sign in to comment.