diff --git a/dbm-ui/backend/db_services/mysql/toolbox/views.py b/dbm-ui/backend/db_services/mysql/toolbox/views.py index 794d31a392..15f0b12b8e 100644 --- a/dbm-ui/backend/db_services/mysql/toolbox/views.py +++ b/dbm-ui/backend/db_services/mysql/toolbox/views.py @@ -86,9 +86,7 @@ def slave_ins_add_domain(self, request, **kwargs): ) cluster_entry.storageinstance_set.add(*slave_ins) try: - dns_manage.create_domain( - instance_list=[f"{slave_ins.machine.ip}#{slave_ins.port}"], add_domain_name=domain - ) + dns_manage.create_domain(instance_list=["{}#{}".format(slave_ip, str(slave_port))], add_domain_name=domain) except Exception as e: logger.error(traceback.format_exc()) return Response({"result": False, "message": _("添加dns记录失败{}".format(e))})