mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-30 12:39:27 +08:00
## Summary When `STORAGE_IMPL=AWS_S3`, the Admin Service status page keeps showing MinIO. Three things conspire: 1. `admin/server/config.py::load_configurations` only knows the `minio` and `minio_0` config keys. An `s3` block lands on the `case _:` branch and logs `Unknown configuration key: s3` (issue #17294). 2. `admin/server/services.py::ServiceMgr.get_all_services` filters retrieval services by `DOC_ENGINE` but has no equivalent filter for `file_store` services by `STORAGE_IMPL`. A stale MinIO block is returned regardless of the active backend. 3. The wired health check is hardcoded to `check_minio_alive`, which calls `settings.MINIO['host']`. With `STORAGE_IMPL=AWS_S3` that block is uninitialized, so the check always times out. Fixes #17294
This commit is contained in:
@@ -273,6 +273,11 @@ class ServiceMgr:
|
||||
@staticmethod
|
||||
def get_all_services():
|
||||
doc_engine = os.getenv("DOC_ENGINE", "elasticsearch")
|
||||
# Map STORAGE_IMPL (e.g. "AWS_S3", "MINIO", "OSS") to the lowercase
|
||||
# `store_type` we use in FileStoreConfig.store_type. The "AWS_"
|
||||
# prefix is stripped so AWS_S3 matches store_type "s3".
|
||||
storage_impl = os.getenv("STORAGE_IMPL", "MINIO")
|
||||
active_store_type = storage_impl.lower().removeprefix("aws_")
|
||||
result = []
|
||||
configs = SERVICE_CONFIGS.configs
|
||||
for service_id, config in enumerate(configs):
|
||||
@@ -280,6 +285,12 @@ class ServiceMgr:
|
||||
if config_dict["service_type"] == "retrieval":
|
||||
if config_dict["extra"]["retrieval_type"] != doc_engine:
|
||||
continue
|
||||
if config_dict["service_type"] == "file_store":
|
||||
# Only show the file-store backend that's actually active.
|
||||
# Without this filter, a stale minio entry from service_conf.yaml
|
||||
# is returned even when STORAGE_IMPL=AWS_S3 (see #17294).
|
||||
if config_dict.get("extra", {}).get("store_type") != active_store_type:
|
||||
continue
|
||||
try:
|
||||
service_detail = ServiceMgr.get_service_details(service_id)
|
||||
if "status" in service_detail:
|
||||
|
||||
Reference in New Issue
Block a user