fix: Redis authentication and etcd connection handling

Fixes two production issues:

1. NOAUTH Redis authentication error:
   - application.ex: Read password from application config
   - exq_supervisor.ex: Read password from application config
   - Both were bypassing runtime.exs config by reading env directly

2. EtcdCoordinator FunctionClauseError:
   - connect_etcd/0 now returns connection name (:towerops_etcd)
   - eetcd functions expect the atom name, not the PID
   - Fixes crash when trying to acquire locks
This commit is contained in:
Graham McIntire 2026-01-24 15:58:21 -06:00
parent 13f86de4b8
commit de0c106212
No known key found for this signature in database

View file

@ -130,7 +130,15 @@ defmodule Towerops.Monitoring.EtcdCoordinator do
~c"etcd-2.etcd.towerops.svc.cluster.local:2379"
]
:eetcd.open(:towerops_etcd, endpoints)
case :eetcd.open(:towerops_etcd, endpoints) do
{:ok, _pid} ->
# Return the connection name (atom), not the PID
# eetcd functions expect the connection name
{:ok, :towerops_etcd}
{:error, _reason} = error ->
error
end
end
defp handle_watch_event(%{type: :delete, kv: %{key: key}}, conn) do