Revision 39c1e700 src/Ganeti/WConfd/DeathDetection.hs
b/src/Ganeti/WConfd/DeathDetection.hs | ||
---|---|---|
45 | 45 |
import Ganeti.BasicTypes |
46 | 46 |
import qualified Ganeti.Constants as C |
47 | 47 |
import qualified Ganeti.Locking.Allocation as L |
48 |
import qualified Ganeti.Locking.Waiting as LW |
|
48 | 49 |
import Ganeti.Locking.Locks (ClientId(..)) |
49 | 50 |
import Ganeti.Logging.Lifted (logDebug, logInfo) |
50 | 51 |
import Ganeti.WConfd.Monad |
... | ... | |
76 | 77 |
died <- liftIO (isDead fpath) |
77 | 78 |
when died $ do |
78 | 79 |
logInfo $ show owner ++ " died, releasing locks" |
79 |
modifyLockAllocation_ (`L.freeLocks` owner)
|
|
80 |
modifyLockWaiting_ (LW.releaseResources owner)
|
|
80 | 81 |
_ <- liftIO . try $ removeFile fpath |
81 | 82 |
:: WConfdMonad (Either IOError ()) |
82 | 83 |
return () |
Also available in: Unified diff