-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
What happened?
When running cAdvisor v0.52.1 with -storage_driver=redis, -storage_driver_host=redis:6379, and -storage_driver_password=redisPswrd, no metrics are persisted. Redis logs report a dropped connection with “Possible SECURITY ATTACK” and the LPUSH never reaches the database. Manually replaying the connection shows the driver never sends AUTH, so Redis immediately rejects the request.
How to reproduce?
-
Start Redis 7/8 with a password (e.g.
requirepass redisPassword). -
Run the stock cAdvisor image (
gcr.io/cadvisor/cadvisor:v0.52.1) with:
-storage_driver=redis -storage_driver_host=redis:6379 -storage_driver_password=redisPswrd -
Watch Redis via
MONITORor check for thecadvisorlist key.
What did you expect to happen?
cAdvisor should authenticate using the configured password and push container stats into Redis.
What actually happened?
Redis blocks the unauthenticated connection. No AUTH command is issued by the driver, so the subsequent LPUSH never succeeds.
Anything else we need to know?
- Confirmed by reading
cmd/internal/storage/redis/redis.go—the driver dials Redis but ignoresstorage.ArgDbPassword. - Reproduced on Docker Desktop / Debian Bookworm host.
- Workaround is to disable authentication on Redis, which isn’t desirable.