Revision 3ee53f1f daemons/ganeti-confd
b/daemons/ganeti-confd | ||
---|---|---|
258 | 258 |
# conflict with that. If so, we might warn or EXIT_FAILURE. |
259 | 259 |
|
260 | 260 |
|
261 |
def ExecConfd(options, _dummy1, _dummy2):
|
|
262 |
"""Main confd function, executed with PID file held
|
|
261 |
def PrepConfd(options, _):
|
|
262 |
"""Prep confd function, executed with PID file held
|
|
263 | 263 |
|
264 | 264 |
""" |
265 | 265 |
# TODO: clarify how the server and reloader variables work (they are |
266 | 266 |
# not used) |
267 |
|
|
267 | 268 |
# pylint: disable-msg=W0612 |
268 | 269 |
mainloop = daemon.Mainloop() |
269 | 270 |
|
... | ... | |
281 | 282 |
# Configuration reloader |
282 | 283 |
reloader = ConfdConfigurationReloader(processor, mainloop) |
283 | 284 |
|
285 |
return mainloop |
|
286 |
|
|
287 |
|
|
288 |
def ExecConfd(options, args, prep_data): # pylint: disable-msg=W0613 |
|
289 |
"""Main confd function, executed with PID file held |
|
290 |
|
|
291 |
""" |
|
292 |
mainloop = prep_data |
|
284 | 293 |
mainloop.Run() |
285 | 294 |
|
286 | 295 |
|
... | ... | |
293 | 302 |
version="%%prog (ganeti) %s" % |
294 | 303 |
constants.RELEASE_VERSION) |
295 | 304 |
|
296 |
daemon.GenericMain(constants.CONFD, parser, CheckConfd, None, ExecConfd)
|
|
305 |
daemon.GenericMain(constants.CONFD, parser, CheckConfd, PrepConfd, ExecConfd)
|
|
297 | 306 |
|
298 | 307 |
|
299 | 308 |
if __name__ == "__main__": |
Also available in: Unified diff