Revision f154a7a3 lib/bootstrap.py
b/lib/bootstrap.py | ||
---|---|---|
126 | 126 |
if not os.path.exists(constants.HMAC_CLUSTER_KEY): |
127 | 127 |
GenerateHmacKey(constants.HMAC_CLUSTER_KEY) |
128 | 128 |
|
129 |
result = utils.RunCmd([constants.NODE_INITD_SCRIPT, "restart"]) |
|
130 |
|
|
129 |
result = utils.RunCmd([constants.DAEMON_UTIL, "start", constants.NODED]) |
|
131 | 130 |
if result.failed: |
132 | 131 |
raise errors.OpExecError("Could not start the node daemon, command %s" |
133 | 132 |
" had exitcode %s and error %s" % |
... | ... | |
241 | 240 |
(master_netdev, |
242 | 241 |
result.output.strip()), errors.ECODE_INVAL) |
243 | 242 |
|
244 |
if not (os.path.isfile(constants.NODE_INITD_SCRIPT) and |
|
245 |
os.access(constants.NODE_INITD_SCRIPT, os.X_OK)): |
|
246 |
raise errors.OpPrereqError("Init.d script '%s' missing or not" |
|
247 |
" executable." % constants.NODE_INITD_SCRIPT, |
|
248 |
errors.ECODE_ENVIRON) |
|
249 |
|
|
250 | 243 |
dirs = [(constants.RUN_GANETI_DIR, constants.RUN_DIRS_MODE)] |
251 | 244 |
utils.EnsureDirs(dirs) |
252 | 245 |
|
... | ... | |
416 | 409 |
"cat > '%s' << '!EOF.' && \n" |
417 | 410 |
"%s!EOF.\n" |
418 | 411 |
"chmod 0400 %s %s %s && " |
419 |
"%s restart" %
|
|
412 |
"%s start %s" %
|
|
420 | 413 |
(constants.SSL_CERT_FILE, noded_cert, |
421 | 414 |
constants.RAPI_CERT_FILE, rapi_cert, |
422 | 415 |
constants.HMAC_CLUSTER_KEY, hmac_key, |
423 | 416 |
constants.SSL_CERT_FILE, constants.RAPI_CERT_FILE, |
424 | 417 |
constants.HMAC_CLUSTER_KEY, |
425 |
constants.NODE_INITD_SCRIPT))
|
|
418 |
constants.DAEMON_UTIL, constants.NODED))
|
|
426 | 419 |
|
427 | 420 |
result = sshrunner.Run(node, 'root', mycommand, batch=False, |
428 | 421 |
ask_key=ssh_key_check, |
Also available in: Unified diff