ganeti

Safe HaskellNone

Ganeti.WConfd.DeathDetection

Description

Utility function for detecting the death of a job holding resources

To clean up resources owned by jobs that die for some reason, we need to detect whether a job is still alive. As we have no control over PID reuse, our approach is that each requester for a resource has to provide a file where it owns an exclusive lock on. The kernel will make sure the lock is removed if the process dies. We can probe for such a lock by requesting a shared lock on the file.

Synopsis

Documentation

cleanupLocks :: WConfdMonad () Source #

Go through all owners once and clean them up, if they're dead.

cleanupLocksTask :: WConfdMonadInt () Source #

Thread periodically cleaning up locks of lock owners that died.