diff --git a/dbm-ui/backend/dbm_init/medium/handlers.py b/dbm-ui/backend/dbm_init/medium/handlers.py index a783d9e72a..437c7ab818 100644 --- a/dbm-ui/backend/dbm_init/medium/handlers.py +++ b/dbm-ui/backend/dbm_init/medium/handlers.py @@ -194,7 +194,7 @@ def sync_from_bkrepo(self, db_type): print("sync info %s", json.dumps(package_params, indent=4)) data = {"db_type": db_type, "sync_medium_infos": package_sync_params} - http.post(url="apis/packages/sync_medium/", data=data) + http.post(url="/apis/packages/sync_medium/", data=data) @classmethod def update_lock(cls, bkrepo_tmp_dir): diff --git a/dbm-ui/backend/dbm_init/medium/network.py b/dbm-ui/backend/dbm_init/medium/network.py index d9408837b1..69a6440f4e 100644 --- a/dbm-ui/backend/dbm_init/medium/network.py +++ b/dbm-ui/backend/dbm_init/medium/network.py @@ -14,6 +14,7 @@ import logging import os from typing import Any +from urllib.parse import urljoin import curlify import requests @@ -59,7 +60,7 @@ def _gen_header_cookie(self, send_file=False): def _http_request( self, method, url, headers=None, data=None, verify=False, cert=None, timeout=None, cookies=None, **kwargs ): - url = f"{os.getenv('DBM_SAAS_URL')}{url}" + url = urljoin(os.getenv("DBM_SAAS_URL"), url) resp = requests.Response() try: if method == "GET": diff --git a/dbm-ui/backend/ticket/builders/redis/redis_instance_apply.py b/dbm-ui/backend/ticket/builders/redis/redis_instance_apply.py index ddbed12be0..aa5b497933 100644 --- a/dbm-ui/backend/ticket/builders/redis/redis_instance_apply.py +++ b/dbm-ui/backend/ticket/builders/redis/redis_instance_apply.py @@ -86,6 +86,7 @@ def format_common_cluster_info(self): CommonValidate._validate_domain_valid(domain_name) # 在info里,补充每个主从集群的部署信息 info.update( + disaster_tolerance_level=self.ticket_data.get("disaster_tolerance_level"), city=self.ticket_data.get("city_code"), city_code=self.ticket_data.get("city_code"), db_version=self.ticket_data.get("db_version"),