fix(admin,api): honor STORAGE_IMPL when surfacing file_store backend (closes #17294) (#17441)

## 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:
Harsh Kashyap
2026-07-29 08:43:20 +05:30
committed by GitHub
parent ee388b0fa5
commit 404a5cc33b
7 changed files with 612 additions and 0 deletions

View File

@@ -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: