Agent Daemon

Roles

The agent daemon spawns threads to handle its different roles:

  • Listener Listens for peer daemon, collector, nodemgr and svcmgr requests.
  • Monitor Handle cluster-wide service start and failover decisions and actions.
  • Scheduler Periodically run node and services schedulers.
  • Heartbeat threads Check if peers are alive and exchange node and service information.

Daemon management

Start

$ nodemgr daemon start

On systems using systemd, the start is delegated to the systemd opensvc-agent unit, which triggers a nodemgr daemon start.

Stop

$ nodemgr daemon stop

The node advertizes its entering maintenance mode, so peer nodes will preserve the node's last known data until the maintenance_grace_period expires.

Restart

$ nodemgr daemon restart

The node advertizes its entering maintenance mode, so peer nodes will preserve the node's last known data until the maintenance_grace_period expires.

On systems using systemd, the restart is delegated to the systemd opensvc-agent unit, which triggers a nodemgr daemon stop followed by a nodemgr daemon start

Debugging

Run the daemon in foreground:

$ sudo python <OSVCLIB>/osvcd.py -f