agdsn / hades

AG DSN Authentication and Authorization Infrastructure
MIT License
8 stars 3 forks source link

Handle master/backup state in the agent #66

Closed sebschrader closed 7 years ago

sebschrader commented 7 years ago

Currently the hades-agent on a backup node is fully active and polling for messages for the whole site and for itself from the central queue.

The agent should however only poll messages that are destined for itself (routing_key contains the full node id instead of just the site name), otherwise the master and the backup node race for messages and might return different answers.

sebschrader commented 7 years ago

Keepalived has a DBus interface since version 1.3.0, it is however not enabled in Debian. Maybe we could use this interface somehow.

I've submitted a patch to Debian to enable this interface.

sebschrader commented 7 years ago

I've added a notify script, hades-vrrp-notify , that ensures that the agent running on the site node whose RADIUS VRRP instance is in MASTER state, is bound to the RPC exchange with the site-specific routing key.

The DBus interface is not necessary for that functionality, but is still useful to determine the bindings when an agent starts.