[Vulnerability]feat(conn): set bootstrap server host (#9931)

This commit is contained in:
Jimmy
2025-09-05 17:36:17 +08:00
committed by GitHub
parent bebd0576e5
commit f40038fb09
7 changed files with 35 additions and 18 deletions

View File

@@ -40,6 +40,7 @@ from typing import (
List,
Optional,
Tuple,
Type,
TypeVar,
Union,
)
@@ -53,6 +54,7 @@ from fastapi import BackgroundTasks
from sglang.srt.aio_rwlock import RWLock
from sglang.srt.configs.model_config import ModelConfig
from sglang.srt.disaggregation.base import BaseKVBootstrapServer
from sglang.srt.disaggregation.utils import (
DisaggregationMode,
KVClassType,
@@ -479,11 +481,12 @@ class TokenizerManager:
# Start kv boostrap server on prefill
if self.disaggregation_mode == DisaggregationMode.PREFILL:
# only start bootstrap server on prefill tm
kv_bootstrap_server_class = get_kv_class(
kv_bootstrap_server_class: Type[BaseKVBootstrapServer] = get_kv_class(
self.disaggregation_transfer_backend, KVClassType.BOOTSTRAP_SERVER
)
self.bootstrap_server = kv_bootstrap_server_class(
self.server_args.disaggregation_bootstrap_port
self.bootstrap_server: BaseKVBootstrapServer = kv_bootstrap_server_class(
host=self.server_args.host,
port=self.server_args.disaggregation_bootstrap_port,
)
is_create_store = (
self.server_args.node_rank == 0