Revision 3b1b0cb6 daemons/ganeti-noded
b/daemons/ganeti-noded | ||
---|---|---|
732 | 732 |
return backend.ValidateHVParams(hvname, hvparams) |
733 | 733 |
|
734 | 734 |
|
735 |
def CheckNODED(options, args): |
|
736 |
"""Initial checks whether to run exit with a failure |
|
737 |
|
|
738 |
""" |
|
739 |
for fname in (constants.SSL_CERT_FILE,): |
|
740 |
if not os.path.isfile(fname): |
|
741 |
print "config %s not there, will not run." % fname |
|
742 |
sys.exit(constants.EXIT_NOTCLUSTER) |
|
743 |
|
|
744 |
|
|
745 | 735 |
def ExecNODED(options, args): |
746 | 736 |
"""Main NODED function, executed with the pidfile held. |
747 | 737 |
|
... | ... | |
749 | 739 |
global queue_lock |
750 | 740 |
|
751 | 741 |
# Read SSL certificate |
752 |
ssl_params = http.HttpSslParams(ssl_key_path=constants.SSL_CERT_FILE, |
|
753 |
ssl_cert_path=constants.SSL_CERT_FILE) |
|
742 |
if options.ssl: |
|
743 |
ssl_params = http.HttpSslParams(ssl_key_path=options.ssl_key, |
|
744 |
ssl_cert_path=options.ssl_cert) |
|
745 |
else: |
|
746 |
ssl_params = None |
|
754 | 747 |
|
755 | 748 |
# Prepare job queue |
756 | 749 |
queue_lock = jstore.InitAndVerifyQueue(must_lock=False) |
... | ... | |
776 | 769 |
dirs = [(val, constants.RUN_DIRS_MODE) for val in constants.SUB_RUN_DIRS] |
777 | 770 |
dirs.append((constants.LOG_OS_DIR, 0750)) |
778 | 771 |
dirs.append((constants.LOCK_DIR, 1777)) |
779 |
daemon.GenericMain(constants.NODED, parser, dirs, CheckNODED, ExecNODED)
|
|
772 |
daemon.GenericMain(constants.NODED, parser, dirs, None, ExecNODED)
|
|
780 | 773 |
|
781 | 774 |
|
782 | 775 |
if __name__ == '__main__': |
Also available in: Unified diff