Revision 9411474b
b/lib/constants.py | ||
---|---|---|
166 | 166 |
FIRST_DRBD_PORT = 11000 |
167 | 167 |
LAST_DRBD_PORT = 14999 |
168 | 168 |
|
169 |
DAEMONS_LOGFILES = {
|
|
170 |
NODED: pathutils.GetLogFilename("node-daemon"),
|
|
171 |
CONFD: pathutils.GetLogFilename("conf-daemon"),
|
|
172 |
RAPI: pathutils.GetLogFilename("rapi-daemon"),
|
|
173 |
MASTERD: pathutils.GetLogFilename("master-daemon"),
|
|
169 |
DAEMONS_LOGBASE = {
|
|
170 |
NODED: "node-daemon",
|
|
171 |
CONFD: "conf-daemon",
|
|
172 |
RAPI: "rapi-daemon",
|
|
173 |
MASTERD: "master-daemon",
|
|
174 | 174 |
} |
175 | 175 |
|
176 |
DAEMONS_LOGFILES = \ |
|
177 |
dict((daemon, pathutils.GetLogFilename(DAEMONS_LOGBASE[daemon])) |
|
178 |
for daemon in DAEMONS_LOGBASE) |
|
179 |
|
|
176 | 180 |
DEV_CONSOLE = "/dev/console" |
177 | 181 |
|
178 | 182 |
PROC_MOUNTS = "/proc/mounts" |
b/src/Ganeti/Runtime.hs | ||
---|---|---|
4 | 4 |
|
5 | 5 |
{- |
6 | 6 |
|
7 |
Copyright (C) 2011, 2012 Google Inc. |
|
7 |
Copyright (C) 2011, 2012, 2013 Google Inc.
|
|
8 | 8 |
|
9 | 9 |
This program is free software; you can redistribute it and/or modify |
10 | 10 |
it under the terms of the GNU General Public License as published by |
... | ... | |
75 | 75 |
daemonName GanetiRapi = C.rapi |
76 | 76 |
daemonName GanetiConfd = C.confd |
77 | 77 |
|
78 |
-- | Returns the log file base for a daemon. |
|
79 |
daemonLogBase :: GanetiDaemon -> String |
|
80 |
daemonLogBase GanetiMasterd = C.daemonsLogbaseGanetiMasterd |
|
81 |
daemonLogBase GanetiNoded = C.daemonsLogbaseGanetiNoded |
|
82 |
daemonLogBase GanetiRapi = C.daemonsLogbaseGanetiRapi |
|
83 |
daemonLogBase GanetiConfd = C.daemonsLogbaseGanetiConfd |
|
84 |
|
|
78 | 85 |
-- | Returns the configured user name for a daemon. |
79 | 86 |
daemonUser :: GanetiDaemon -> String |
80 | 87 |
daemonUser GanetiMasterd = C.masterdUser |
... | ... | |
95 | 102 |
daemonLogFile :: GanetiDaemon -> IO FilePath |
96 | 103 |
daemonLogFile daemon = do |
97 | 104 |
logDir <- Path.logDir |
98 |
return $ logDir </> daemonName daemon <.> "log"
|
|
105 |
return $ logDir </> daemonLogBase daemon <.> "log"
|
|
99 | 106 |
|
100 | 107 |
-- | Returns the pid file name for a daemon. |
101 | 108 |
daemonPidFile :: GanetiDaemon -> IO FilePath |
Also available in: Unified diff