Skip to content

Commit 568b6d0

Browse files
authored
[P/D] Check wildcard address for layerwise connector (#7389)
### What this PR does / why we need it? Check wildcard address address for layerwise connector - vLLM version: v0.17.0 - vLLM main: vllm-project/vllm@4034c3d --------- Signed-off-by: liziyu <liziyu16@huawei.com>
1 parent 73cadec commit 568b6d0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

examples/disaggregated_prefill_v1/load_balance_proxy_layerwise_server_example.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ def __init__(self, host, port):
117117
self.host = host
118118
self.port = port
119119
self.url = f"http://{host}:{port}/v1"
120+
# Auto-completion for ipv6
120121
try:
121122
ip = ipaddress.ip_address(self.host)
122123
if isinstance(ip, ipaddress.IPv6Address):
@@ -268,6 +269,16 @@ def parse_args():
268269
"--retry-delay", type=float, default=0.001, help="Base delay (seconds) for exponential backoff retries"
269270
)
270271
args = parser.parse_args()
272+
logger.info(
273+
f"Decoder hosts will access Proxy host:port/metaserver, ensure that {set(args.decoder_hosts)} "
274+
f"can access {args.host}:{args.port}/metaserver"
275+
)
276+
# Wildcard address is not allowed for layerwise connector
277+
if args.host in ["0.0.0.0", "::", "0:0:0:0:0:0:0:0"]:
278+
raise ValueError(
279+
f"Decoder hosts will access Proxy host:port/metaserver, to avoid configuration errors, "
280+
f"the Wildcard Address {args.host} is not allowed for proxy"
281+
)
271282
if len(args.prefiller_hosts) != len(args.prefiller_ports):
272283
raise ValueError("Number of prefiller hosts must match number of prefiller ports")
273284
if len(args.decoder_hosts) != len(args.decoder_ports):

0 commit comments

Comments
 (0)