Revision 3ef51126 scripts/gnt-node
b/scripts/gnt-node | ||
---|---|---|
29 | 29 |
import sys |
30 | 30 |
|
31 | 31 |
from ganeti.cli import * |
32 |
from ganeti import bootstrap |
|
32 | 33 |
from ganeti import opcodes |
33 | 34 |
from ganeti import utils |
34 | 35 |
from ganeti import constants |
... | ... | |
147 | 148 |
cmd.append("--debug") |
148 | 149 |
elif options.verbose: |
149 | 150 |
cmd.append("--verbose") |
151 |
if options.ssh_key_check: |
|
152 |
cmd.append("--no-ssh-key-check") |
|
150 | 153 |
|
151 | 154 |
cmd.extend(nodes) |
152 | 155 |
|
... | ... | |
195 | 198 |
|
196 | 199 |
# read the cluster name from the master |
197 | 200 |
output = cl.QueryConfigValues(['cluster_name']) |
201 |
cluster_name = output[0] |
|
198 | 202 |
|
199 |
if not readd: |
|
203 |
if not readd and opts.node_setup:
|
|
200 | 204 |
ToStderr("-- WARNING -- \n" |
201 | 205 |
"Performing this operation is going to replace the ssh daemon" |
202 | 206 |
" keypair\n" |
... | ... | |
207 | 211 |
if opts.node_setup: |
208 | 212 |
_RunSetupSSH(opts, [node]) |
209 | 213 |
|
214 |
bootstrap.SetupNodeDaemon(cluster_name, node, opts.ssh_key_check) |
|
215 |
|
|
210 | 216 |
op = opcodes.OpAddNode(node_name=args[0], secondary_ip=sip, |
211 | 217 |
readd=opts.readd) |
212 | 218 |
SubmitOpCode(op, opts=opts) |
... | ... | |
667 | 673 |
commands = { |
668 | 674 |
'add': ( |
669 | 675 |
AddNode, [ArgHost(min=1, max=1)], |
670 |
[SECONDARY_IP_OPT, READD_OPT, NONODE_SETUP_OPT, VERBOSE_OPT], |
|
671 |
"[-s ip] [--readd] [--no-node-setup] [--verbose] " |
|
676 |
[SECONDARY_IP_OPT, READD_OPT, NOSSH_KEYCHECK_OPT, NONODE_SETUP_OPT, |
|
677 |
VERBOSE_OPT], |
|
678 |
"[-s ip] [--readd] [--no-ssh-key-check] [--no-node-setup] [--verbose] " |
|
672 | 679 |
" <node_name>", |
673 | 680 |
"Add a node to the cluster"), |
674 | 681 |
'evacuate': ( |
Also available in: Unified diff