Revision 99e88451
b/daemons/ganeti-masterd | ||
---|---|---|
329 | 329 |
utils.Daemonize(logfile=constants.LOG_MASTERDAEMON, |
330 | 330 |
noclose_fds=[master.fileno()]) |
331 | 331 |
|
332 |
utils.WritePidFile('ganeti-masterd')
|
|
332 |
utils.WritePidFile(constants.MASTERD_PID)
|
|
333 | 333 |
|
334 | 334 |
logger.SetupDaemon(constants.LOG_MASTERDAEMON, debug=options.debug, |
335 | 335 |
stderr_logging=not options.fork) |
... | ... | |
341 | 341 |
master.serve_forever() |
342 | 342 |
finally: |
343 | 343 |
master.server_cleanup() |
344 |
utils.RemovePidFile('ganeti-masterd')
|
|
344 |
utils.RemovePidFile(constants.MASTERD_PID)
|
|
345 | 345 |
|
346 | 346 |
|
347 | 347 |
if __name__ == "__main__": |
b/daemons/ganeti-noded | ||
---|---|---|
615 | 615 |
if options.fork: |
616 | 616 |
utils.Daemonize(logfile=constants.LOG_NODESERVER) |
617 | 617 |
|
618 |
utils.WritePidFile('ganeti-noded')
|
|
618 |
utils.WritePidFile(constants.NODED_PID)
|
|
619 | 619 |
|
620 | 620 |
logger.SetupDaemon(logfile=constants.LOG_NODESERVER, debug=options.debug, |
621 | 621 |
stderr_logging=not options.fork) |
... | ... | |
629 | 629 |
try: |
630 | 630 |
server.serve_forever() |
631 | 631 |
finally: |
632 |
utils.RemovePidFile('ganeti-noded')
|
|
632 |
utils.RemovePidFile(constants.NODED_PID)
|
|
633 | 633 |
|
634 | 634 |
|
635 | 635 |
if __name__ == '__main__': |
b/daemons/ganeti-rapi | ||
---|---|---|
132 | 132 |
if options.fork: |
133 | 133 |
utils.Daemonize(logfile=constants.LOG_RAPISERVER) |
134 | 134 |
|
135 |
utils.WritePidFile('ganeti-rapi')
|
|
135 |
utils.WritePidFile(constants.RAPI_PID)
|
|
136 | 136 |
|
137 | 137 |
log_fd = open(constants.LOG_RAPIACCESS, 'a') |
138 | 138 |
try: |
... | ... | |
143 | 143 |
httpd.serve_forever() |
144 | 144 |
finally: |
145 | 145 |
httpd.server_close() |
146 |
utils.RemovePidFile('ganeti-rapi')
|
|
146 |
utils.RemovePidFile(constants.RAPI_PID)
|
|
147 | 147 |
|
148 | 148 |
finally: |
149 | 149 |
log_fd.close() |
b/lib/constants.py | ||
---|---|---|
97 | 97 |
DEFAULT_FILE_STORAGE_DIR = _autoconf.FILE_STORAGE_DIR |
98 | 98 |
MASTER_SOCKET = RUN_GANETI_DIR + "/master.sock" |
99 | 99 |
|
100 |
# PID files |
|
101 |
MASTERD_PID = "ganeti-master" |
|
102 |
NODED_PID = "ganeti-noded" |
|
103 |
RAPI_PID = "ganeti-rapi" |
|
104 |
|
|
100 | 105 |
NODE_INITD_SCRIPT = _autoconf.SYSCONFDIR + "/init.d/ganeti" |
101 | 106 |
DEFAULT_NODED_PORT = 1811 |
102 | 107 |
FIRST_DRBD_PORT = 11000 |
Also available in: Unified diff