Skip to content

Commit 3661b4a

Browse files
committed
fix(redis): 捕捉NameServiceApi异常 #10021
1 parent 24292cf commit 3661b4a

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

dbm-ui/backend/flow/plugins/components/collections/common/clb_manage.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ def _execute(self, data, parent_data) -> bool:
8686
self.log_error(_("无法适配到传入的域名处理类型,请联系系统管理员:{}").format(dns_op_type))
8787
return False
8888

89+
self.log_info(result)
90+
if "code" in result and result["code"] != 0:
91+
self.log_error(_("调用clb执行失败:{}").format(result))
92+
return False
8993
self.log_info("successfully")
9094
return result
9195

dbm-ui/backend/flow/plugins/components/collections/common/polaris_manage.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ def _execute(self, data, parent_data) -> bool:
7676
self.log_error(_("无法适配到传入的域名处理类型,请联系系统管理员:{}").format(dns_op_type))
7777
return False
7878

79+
self.log_info(result)
80+
if "code" in result and result["code"] != 0:
81+
self.log_error(_("调用polaris执行失败").format(result))
82+
return False
7983
self.log_info("successfully")
8084
return result
8185

dbm-ui/backend/flow/plugins/components/collections/redis/dns_manage.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def _execute(self, data, parent_data) -> bool:
5252
# 传入调用结果
5353
dns_op_type = kwargs["dns_op_type"]
5454
dns_manage = DnsManage(bk_biz_id=global_data["bk_biz_id"], bk_cloud_id=kwargs["bk_cloud_id"])
55-
result = False
5655
if dns_op_type == DnsOpType.CREATE:
5756
# 添加域名映射,适配集群申请,单独添加域名的场景
5857
exec_ips = self.__get_exec_ips(kwargs=kwargs, trans_data=trans_data)

0 commit comments

Comments
 (0)