Commit 2745aa81 authored by Petr Pudlak's avatar Petr Pudlak

Add functions for computing the full path of livelock files

.. so that Haskell code can create them at the proper place.
Signed-off-by: default avatarPetr Pudlak <pudlak@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent db54a9e2
......@@ -28,6 +28,8 @@ module Ganeti.Path
, runDir
, logDir
, socketDir
, livelockDir
, livelockFile
, defaultMasterSocket
, defaultQuerySocket
, defaultWConfdSocket
......@@ -88,6 +90,15 @@ logDir = addNodePrefix $ AutoConf.localstatedir </> "log" </> "ganeti"
socketDir :: IO FilePath
socketDir = runDir `pjoin` "socket"
-- | Directory for the jobs' livelocks.
livelockDir :: IO FilePath
livelockDir = runDir `pjoin` "livelocks"
-- | A helper for building a job's livelock file. It prepends
-- 'livelockDir' to a given filename.
livelockFile :: FilePath -> IO FilePath
livelockFile = pjoin livelockDir
-- | The default path for the master-daemon LUXI socket.
defaultMasterSocket :: IO FilePath
defaultMasterSocket = socketDir `pjoin` "ganeti-master"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment