Commit 111a7d04 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Migrate lib/utils/*.py from constants to pathutils



File system paths moved from constants to pathutils.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 3e8dcc8a
......@@ -41,6 +41,7 @@ import signal
from ganeti import errors
from ganeti import constants
from ganeti import compat
from ganeti import pathutils
from ganeti.utils.algo import *
from ganeti.utils.filelock import *
......@@ -466,7 +467,7 @@ def EnsureDaemon(name):
"""Check for and start daemon if not alive.
"""
result = RunCmd([constants.DAEMON_UTIL, "check-and-start", name])
result = RunCmd([pathutils.DAEMON_UTIL, "check-and-start", name])
if result.failed:
logging.error("Can't start daemon '%s', failure %s, output: %s",
name, result.fail_reason, result.output)
......@@ -479,7 +480,7 @@ def StopDaemon(name):
"""Stop daemon
"""
result = RunCmd([constants.DAEMON_UTIL, "stop", name])
result = RunCmd([pathutils.DAEMON_UTIL, "stop", name])
if result.failed:
logging.error("Can't stop daemon '%s', failure %s, output: %s",
name, result.fail_reason, result.output)
......
......@@ -32,6 +32,7 @@ import stat
from ganeti import errors
from ganeti import constants
from ganeti import pathutils
from ganeti.utils import filelock
......@@ -903,7 +904,7 @@ def DaemonPidFileName(name):
daemon name
"""
return PathJoin(constants.RUN_DIR, "%s.pid" % name)
return PathJoin(pathutils.RUN_DIR, "%s.pid" % name)
def WritePidFile(pidfile):
......
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