On Thu, Nov 7, 2013 at 1:20 PM, Klaus Aehlig <[email protected]> wrote:
> To avoid several processes accessing the queue at the same time,
> Ganeti locks the queue via a lock file on disk. Provide the path
> to this file.
>
> Signed-off-by: Klaus Aehlig <[email protected]>
> ---
>  src/Ganeti/Path.hs | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/src/Ganeti/Path.hs b/src/Ganeti/Path.hs
> index 2c45afd..8c2df69 100644
> --- a/src/Ganeti/Path.hs
> +++ b/src/Ganeti/Path.hs
> @@ -35,6 +35,7 @@ module Ganeti.Path
>    , nodedCertFile
>    , queueDir
>    , jobQueueSerialFile
> +  , jobQueueLockFile
>    , jobQueueArchiveSubDir
>    , instanceReasonDir
>    , getInstReasonFilename
> @@ -110,6 +111,10 @@ queueDir = dataDirP "queue"
>  jobQueueSerialFile :: IO FilePath
>  jobQueueSerialFile = queueDir `pjoin` "serial"
>
> +-- | Job queue lock file
> +jobQueueLockFile :: IO FilePath
> +jobQueueLockFile = queueDir `pjoin` "lock"
> +
>  -- | Job queue archive directory.
>  jobQueueArchiveSubDir :: FilePath
>  jobQueueArchiveSubDir = "archive"
> --
> 1.8.4.1
>

LGTM, thanks.

-- 
Google Germany GmbH
Dienerstr. 12
80331 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Graham Law, Christine Elizabeth Flores

Reply via email to