You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(backend): the Redis service manager queries the SLM with an empty node id and no credential, so status is always unknown #16346
Found while moving Redis control into the SLM (#16245, #16252). Code read from base a12b4bf79; the live-host facts come from the local test install's logs, read only. Nothing was executed.
What happens
RedisServiceManager takes its node from config.redis_node_id (autobot-backend/services/redis_service_manager.py:35,118). autobot_shared/ssot_config.py:2035 defaults REDIS_NODE_ID to "". Only docker-compose.yml:280,414 sets it. On the test install the manager logs initialized for node=, service=redis-stack-server.
_slm_service_action posts to /api/nodes//services/redis-stack-server/{action}.
Neither request carries a credential: get_http_client().tracked_request(...) is called with no auth header. The SLM's list_node_services (autobot-slm-backend/api/services.py:206-211) requires get_current_user.
_slm_get_service_status maps any non-200 to "unknown".
get_service_status fills only status and last_check, so pid, uptime_seconds and memory_mb are always null.
The upshot: on this install, GET /api/redis-service/status answers 200 with status "unknown". The SLM panel polled it 130 times in the current backend log.
I did not capture the SLM's reply to the empty-id request; no SLM access-log line for it exists.
After #16245 the SLM's Redis panel reads the SLM's own node-service API directly and no longer calls /api/redis-service. That router stays in place.
Related: a second Redis path with no caller
The SLM has its own autobot-slm-backend/api/redis_service.py, mounted with require_service_management. It runs systemctl and redis-cli INFO on the SLM host itself. No frontend calls it, and it is only correct when Redis runs on the SLM host.
Ask
Resolve the Redis node from the SLM's redis role owner (GET /api/roles/owners), not from an env var that bare-metal installs never set. Or fail loudly on an empty id, instead of querying /api/nodes//services.
Send a credential the SLM accepts.
Report an empty-id or 401 failure as what it is, not as "unknown".
Decide whether the SLM's local /api/redis-service route stays. If it does, give it a caller or record why it has none.
Still live on the dev install at 555e914 (2026-10-18). Startup logs Redis Service Manager initialized for node=, service=redis-stack-server, and GET /api/redis-service/status as an admin returns 200 with {"status":"unknown","pid":null,...} while redis-stack-server is running. Since #18774 the route is gated (anonymous gets 401), so this is now the only defect on it.
Also unused from the frontends: the SLM's own autobot-slm-backend/api/redis_service.py.
Options:
Retire the backend's /api/redis-service route and RedisServiceManager (recommended). The SLM is the control plane for all services and already serves this to the panel, so the defect goes away with the path that has it. The removal would be re-checked for callers on main at the time.
Keep it and let the backend through. Move the SLM routes above to require_service_management_or_internal, send the internal key, and report empty-id and 401 failures as themselves. This gives a machine credential the power to start and stop services on any node, for a route with no known caller.
Keep it and fail loudly only. An empty id or refused call reports what happened instead of unknown. Status stays unavailable, but stops misleading.
Separately, the SLM's own /api/redis-service needs a ruling too. It only works when Redis runs on the SLM host. Recommended: leave it in place and track it under this issue until the first choice is made.
Maintainer decision: option 1. Retire the backend's /api/redis-service route and RedisServiceManager; the SLM does this job. The maintainer noted that outside callers can't be seen from the repo.
Before removal, on main at that time:
Confirm the SLM's replacement for the route and manager has landed, and quote it.
Confirm nothing else uses the manager.
The PR waits until the merge train coordinator asks for it. The SLM's own /api/redis-service was not part of this decision and stays as it is.
Owner decision (2026-11-22): keep the SLM's own /api/redis-service route. #22030 documents in its module docstring that it currently has no caller and is correct only when Redis runs on the SLM host. No code is removed.
Activity
mrveiss commentedon Oct 18, 2026
Still live on the dev install at 555e914 (2026-10-18). Startup logs
Redis Service Manager initialized for node=, service=redis-stack-server, andGET /api/redis-service/statusas an admin returns 200 with{"status":"unknown","pid":null,...}while redis-stack-server is running. Since #18774 the route is gated (anonymous gets 401), so this is now the only defect on it.github-actions commentedon Oct 31, 2026
needs-structurecleared: goal milestone, matching phase label and native parent (or sub-issues) are all present (#19522).mrveiss commentedon Nov 2, 2026
Decision needed: the credential fix asked for here cannot work without widening SLM auth, and nothing calls this route.
Read from main at 6c34ee1. Nothing was run.
_mint_service_jwtinservices/slm_client.py, which carriesservice: true.list_node_services, the start/stop/restart routes (autobot-slm-backend/api/services.py) and/api/roles/ownersall use the SLM'sget_current_user. Since security(slm): get_current_user accepts MFA-pending temp tokens as full sessions (#17049 fixed only the backend) #18321 that refuses a token with aserviceclaim, throughis_purpose_bound. So sending this token would turn a request with no credential into a refused one, and the role-owner lookup is refused the same way.openapi.json,git grep redis-servicein the frontends, backend and shared code finds only the router registration (feature_routers.py:516). The SLM panel reads the SLM's own node-service API since tech-debt(frontend): move SettingsPanel's detailed system health and Redis service management into the SLM #16245. External callers of the route can't be seen from the repo.autobot-slm-backend/api/redis_service.py.Options:
/api/redis-serviceroute andRedisServiceManager(recommended). The SLM is the control plane for all services and already serves this to the panel, so the defect goes away with the path that has it. The removal would be re-checked for callers on main at the time.require_service_management_or_internal, send the internal key, and report empty-id and 401 failures as themselves. This gives a machine credential the power to start and stop services on any node, for a route with no known caller.unknown. Status stays unavailable, but stops misleading.Separately, the SLM's own
/api/redis-serviceneeds a ruling too. It only works when Redis runs on the SLM host. Recommended: leave it in place and track it under this issue until the first choice is made.mrveiss commentedon Nov 2, 2026
Maintainer decision: option 1. Retire the backend's
/api/redis-serviceroute andRedisServiceManager; the SLM does this job. The maintainer noted that outside callers can't be seen from the repo.Before removal, on main at that time:
The PR waits until the merge train coordinator asks for it. The SLM's own
/api/redis-servicewas not part of this decision and stays as it is.mrveiss commentedon Nov 22, 2026
Owner decision (2026-11-22): keep the SLM's own
/api/redis-serviceroute. #22030 documents in its module docstring that it currently has no caller and is correct only when Redis runs on the SLM host. No code is removed.