Revision eafd8762
b/daemons/ganeti-noded | ||
---|---|---|
710 | 710 |
stderr_logging=not options.fork) |
711 | 711 |
logging.info("ganeti node daemon startup") |
712 | 712 |
|
713 |
# Read SSL certificate |
|
714 |
ssl_params = http.HttpSslParams(ssl_key_path=constants.SSL_CERT_FILE, |
|
715 |
ssl_cert_path=constants.SSL_CERT_FILE) |
|
716 |
|
|
713 | 717 |
# Prepare job queue |
714 | 718 |
queue_lock = jstore.InitAndVerifyQueue(must_lock=False) |
715 | 719 |
|
716 | 720 |
mainloop = daemon.Mainloop() |
717 |
server = NodeHttpServer(mainloop, "", port) |
|
721 |
server = NodeHttpServer(mainloop, "", port, |
|
722 |
ssl_params=ssl_params, ssl_verify_peer=True) |
|
718 | 723 |
server.Start() |
719 | 724 |
try: |
720 | 725 |
mainloop.Run() |
b/lib/rpc.py | ||
---|---|---|
39 | 39 |
from ganeti import objects |
40 | 40 |
from ganeti import http |
41 | 41 |
from ganeti import serializer |
42 |
from ganeti import constants |
|
42 | 43 |
|
43 | 44 |
|
44 | 45 |
# Module level variable |
... | ... | |
121 | 122 |
if address is None: |
122 | 123 |
address = name |
123 | 124 |
|
125 |
# TODO: Cache key and certificate for different requests |
|
126 |
ssl_params = http.HttpSslParams(ssl_key_path=constants.SSL_CERT_FILE, |
|
127 |
ssl_cert_path=constants.SSL_CERT_FILE) |
|
128 |
|
|
124 | 129 |
self.nc[name] = http.HttpClientRequest(address, self.port, http.HTTP_PUT, |
125 | 130 |
"/%s" % self.procedure, |
126 |
post_data=self.body) |
|
131 |
post_data=self.body, |
|
132 |
ssl_params=ssl_params, |
|
133 |
ssl_verify_peer=True) |
|
127 | 134 |
|
128 | 135 |
def GetResults(self): |
129 | 136 |
"""Call nodes and return results. |
Also available in: Unified diff