LGTM

On Wed, Jun 25, 2014 at 06:24:45PM +0200, 'Klaus Aehlig' via ganeti-devel wrote:
> Occasionally, luxid needs to provide a running job with
> information, e.g., the new priority, if a change of job
> priority is requested. As the number of useful signals
> to notify a process is limited, the actual payload will
> be provided over the file system.
> 
> Signed-off-by: Klaus Aehlig <aeh...@google.com>
> ---
>  lib/pathutils.py         | 1 +
>  lib/tools/ensure_dirs.py | 2 ++
>  src/Ganeti/Path.hs       | 6 ++++++
>  3 files changed, 9 insertions(+)
> 
> diff --git a/lib/pathutils.py b/lib/pathutils.py
> index 67ac41d..002da46 100644
> --- a/lib/pathutils.py
> +++ b/lib/pathutils.py
> @@ -86,6 +86,7 @@ INSTANCE_REASON_DIR = RUN_DIR + "/instance-reason"
>  #: this directory)
>  UIDPOOL_LOCKDIR = RUN_DIR + "/uid-pool"
>  LIVELOCK_DIR = RUN_DIR + "/livelocks"
> +LUXID_MESSAGE_DIR = RUN_DIR + "/luxidmessages"
>  
>  SSCONF_LOCK_FILE = LOCK_DIR + "/ganeti-ssconf.lock"
>  
> diff --git a/lib/tools/ensure_dirs.py b/lib/tools/ensure_dirs.py
> index 243f03a..1d165b1 100644
> --- a/lib/tools/ensure_dirs.py
> +++ b/lib/tools/ensure_dirs.py
> @@ -209,6 +209,8 @@ def GetPaths():
>      (pathutils.INSTANCE_REASON_DIR, DIR, 0755, getent.noded_uid,
>       getent.noded_gid),
>      (pathutils.LIVELOCK_DIR, DIR, 0750, getent.masterd_uid, 
> getent.daemons_gid),
> +    (pathutils.LUXID_MESSAGE_DIR, DIR, 0750, getent.masterd_uid,
> +     getent.daemons_gid),
>      ])
>  
>    return paths
> diff --git a/src/Ganeti/Path.hs b/src/Ganeti/Path.hs
> index bf9156d..d6a1252 100644
> --- a/src/Ganeti/Path.hs
> +++ b/src/Ganeti/Path.hs
> @@ -28,6 +28,7 @@ module Ganeti.Path
>    , runDir
>    , logDir
>    , socketDir
> +  , luxidMessageDir
>    , livelockDir
>    , livelockFile
>    , defaultQuerySocket
> @@ -94,6 +95,11 @@ socketDir = runDir `pjoin` "socket"
>  livelockDir :: IO FilePath
>  livelockDir = runDir `pjoin` "livelocks"
>  
> +-- | Directory for luxid to write messages to running jobs, like
> +-- requests to change the priority.
> +luxidMessageDir :: IO FilePath
> +luxidMessageDir = runDir `pjoin` "luxidmessages"
> +
>  -- | A helper for building a job's livelock file. It prepends
>  -- 'livelockDir' to a given filename.
>  livelockFile :: FilePath -> IO FilePath
> -- 
> 2.0.0.526.g5318336
> 

Reply via email to