Revision 3ee53f1f daemons/ganeti-noded
b/daemons/ganeti-noded | ||
---|---|---|
914 | 914 |
sys.exit(constants.EXIT_FAILURE) |
915 | 915 |
|
916 | 916 |
|
917 |
def ExecNoded(options, _dummy1, _dummy2):
|
|
918 |
"""Main node daemon function, executed with the PID file held.
|
|
917 |
def PrepNoded(options, _):
|
|
918 |
"""Preparation node daemon function, executed with the PID file held.
|
|
919 | 919 |
|
920 | 920 |
""" |
921 | 921 |
if options.mlock: |
... | ... | |
947 | 947 |
ssl_params=ssl_params, ssl_verify_peer=True, |
948 | 948 |
request_executor_class=request_executor_class) |
949 | 949 |
server.Start() |
950 |
return (mainloop, server) |
|
951 |
|
|
952 |
def ExecNoded(options, args, prep_data): # pylint: disable-msg=W0613 |
|
953 |
"""Main node daemon function, executed with the PID file held. |
|
954 |
|
|
955 |
""" |
|
956 |
(mainloop, server) = prep_data |
|
950 | 957 |
try: |
951 | 958 |
mainloop.Run() |
952 | 959 |
finally: |
... | ... | |
965 | 972 |
help="Do not mlock the node memory in ram", |
966 | 973 |
default=True, action="store_false") |
967 | 974 |
|
968 |
daemon.GenericMain(constants.NODED, parser, CheckNoded, None, ExecNoded,
|
|
975 |
daemon.GenericMain(constants.NODED, parser, CheckNoded, PrepNoded, ExecNoded,
|
|
969 | 976 |
default_ssl_cert=constants.NODED_CERT_FILE, |
970 | 977 |
default_ssl_key=constants.NODED_CERT_FILE, |
971 | 978 |
console_logging=True) |
Also available in: Unified diff