ganeti-3.1: Cluster-based virtualization management software
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ganeti.Utils.Livelock

Description

Utilities related to livelocks and death detection

Synopsis

Documentation

type Livelock = FilePath #

mkLivelockFile :: (Error e, MonadError e m, MonadIO m) => FilePath -> m (Fd, Livelock) #

Appends the current time to the given prefix, creates the lockfile in the appropriate directory, and locks it. Returns its full path and the file's file descriptor.

listLiveLocks :: IO [FilePath] #

List currently existing livelocks. Underapproximate if some error occurs.

isDead :: Livelock -> IO Bool #

Detect whether a the process identified by the given path does not exist any more. This function never fails and only returns True if it has positive knowledge that the process does not exist any more (i.e., if it managed successfully obtain a shared lock on the file).