[Cherry-pick] [0.11.0] pd proxy support ipv6 and fix proxy (#4242)

### What this PR does / why we need it?
pd proxy support ipv6, mooncake connector check whether the IPv6 address
is used and notify the user.

---------

Signed-off-by: liziyu <liziyu16@huawei.com>
This commit is contained in:
liziyu
2025-11-18 16:33:00 +08:00
committed by GitHub
parent 378e92a2a2
commit ddf3e75800
4 changed files with 29 additions and 5 deletions

View File

@@ -1,3 +1,4 @@
import ipaddress
import threading
from typing import Optional
@@ -8,6 +9,15 @@ _global_te_lock = threading.Lock()
def get_global_te(hostname: str, device_name: Optional[str]):
try:
ip = ipaddress.ip_address(hostname)
if isinstance(ip, ipaddress.IPv6Address):
raise RuntimeError(
"The backend of mooncake's Ascend Direct Xfer Library currently does not support IPv6."
)
except ValueError:
pass
global _global_te
if _global_te is None:
with _global_te_lock: