mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-30 04:29:24 +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:
@@ -15,6 +15,7 @@
|
||||
#
|
||||
from datetime import datetime
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import requests
|
||||
from timeit import default_timer as timer
|
||||
@@ -246,6 +247,21 @@ def check_minio_alive():
|
||||
}
|
||||
|
||||
|
||||
def check_s3_alive():
|
||||
"""
|
||||
Check AWS S3 (or any S3-compatible) liveness via the active
|
||||
storage backend's `.health()` method. Delegates to the generic
|
||||
``check_storage`` so the same check works for AWS S3, MinIO,
|
||||
R2, and any other S3-compatible endpoint. See #17294.
|
||||
"""
|
||||
ok, payload = check_storage()
|
||||
if ok:
|
||||
logging.debug("check_s3_alive: ok, elapsed=%s ms", payload.get("elapsed", "?"))
|
||||
return {"status": "alive", "message": f"Confirm elapsed: {payload.get('elapsed', '?')} ms."}
|
||||
logging.debug("check_s3_alive: failed, error=%s", payload.get("error", "unknown"))
|
||||
return {"status": "timeout", "message": f"error: {payload.get('error', 'unknown')}"}
|
||||
|
||||
|
||||
def get_redis_info():
|
||||
try:
|
||||
return {"status": "alive", "message": REDIS_CONN.info()}
|
||||
|
||||
Reference in New Issue
Block a user