Revision 9894ece7
b/daemons/ganeti-masterd | ||
---|---|---|
127 | 127 |
""" |
128 | 128 |
try: |
129 | 129 |
self.server_close() |
130 |
utils.RemoveFile(constants.MASTER_SOCKET) |
|
131 | 130 |
finally: |
132 | 131 |
if self.request_workers: |
133 | 132 |
self.request_workers.TerminateWorkers() |
b/lib/constants.py | ||
---|---|---|
95 | 95 |
QUEUE_DIR = DATA_DIR + "/queue" |
96 | 96 |
ETC_HOSTS = "/etc/hosts" |
97 | 97 |
DEFAULT_FILE_STORAGE_DIR = _autoconf.FILE_STORAGE_DIR |
98 |
MASTER_SOCKET = RUN_GANETI_DIR + "/master.sock" |
|
98 |
|
|
99 |
# Quoting unix(7) on Linux: |
|
100 |
# Linux also supports an abstract namespace which is independent of the file |
|
101 |
# system. [...] If sun_path starts with a null byte ('\0'), then it refers to |
|
102 |
# the abstract namespace maintained by the Unix protocol module. The socket's |
|
103 |
# address in this namespace is given by the rest of the bytes in sun_path. |
|
104 |
# |
|
105 |
# By using this Linux-specific way we don't have to care about removing the |
|
106 |
# socket file when quitting or starting (after an unclean shutdown). |
|
107 |
# |
|
108 |
# Sample output for "netstat -nlp": |
|
109 |
# unix 2 [ ACC ] STREAM LISTENING 247919 1234/python @ganeti-master |
|
110 |
MASTER_SOCKET = "\0ganeti-master" |
|
99 | 111 |
|
100 | 112 |
# PID files |
101 | 113 |
MASTERD_PID = "ganeti-masterd" |
Also available in: Unified diff