Revision cd34faf2
b/lib/bootstrap.py | ||
---|---|---|
66 | 66 |
utils.AddAuthorizedKey(auth_keys, utils.ReadFile(pub_key)) |
67 | 67 |
|
68 | 68 |
|
69 |
def _GenerateSelfSignedSslCert(file_name, validity=(365 * 5)):
|
|
69 |
def GenerateSelfSignedSslCert(file_name, validity=(365 * 5)): |
|
70 | 70 |
"""Generates a self-signed SSL certificate. |
71 | 71 |
|
72 | 72 |
@type file_name: str |
... | ... | |
107 | 107 |
the cluster and also generates the SSL certificate. |
108 | 108 |
|
109 | 109 |
""" |
110 |
_GenerateSelfSignedSslCert(constants.SSL_CERT_FILE)
|
|
110 |
GenerateSelfSignedSslCert(constants.SSL_CERT_FILE) |
|
111 | 111 |
|
112 | 112 |
# Don't overwrite existing file |
113 | 113 |
if not os.path.exists(constants.RAPI_CERT_FILE): |
114 |
_GenerateSelfSignedSslCert(constants.RAPI_CERT_FILE)
|
|
114 |
GenerateSelfSignedSslCert(constants.RAPI_CERT_FILE) |
|
115 | 115 |
|
116 | 116 |
if not os.path.exists(constants.HMAC_CLUSTER_KEY): |
117 | 117 |
utils.WriteFile(constants.HMAC_CLUSTER_KEY, |
b/lib/config.py | ||
---|---|---|
1211 | 1211 |
# Write ssconf files on all nodes (including locally) |
1212 | 1212 |
if self._last_cluster_serial < self._config_data.cluster.serial_no: |
1213 | 1213 |
if not self._offline: |
1214 |
result = rpc.RpcRunner.call_write_ssconf_files(\
|
|
1214 |
result = rpc.RpcRunner.call_write_ssconf_files( |
|
1215 | 1215 |
self._UnlockedGetNodeList(), |
1216 | 1216 |
self._UnlockedGetSsconfValues()) |
1217 | 1217 |
for nname, nresu in result.items(): |
b/tools/cfgupgrade | ||
---|---|---|
170 | 170 |
if not options.dry_run: |
171 | 171 |
if not os.path.exists(options.RAPI_CERT_FILE): |
172 | 172 |
logging.debug("Writing RAPI certificate to %s", options.RAPI_CERT_FILE) |
173 |
bootstrap._GenerateSelfSignedSslCert(options.RAPI_CERT_FILE)
|
|
173 |
bootstrap.GenerateSelfSignedSslCert(options.RAPI_CERT_FILE) |
|
174 | 174 |
|
175 | 175 |
except: |
176 | 176 |
logging.critical("Writing configuration failed. It is probably in an" |
Also available in: Unified diff