Revision 82122173 scripts/gnt-instance
b/scripts/gnt-instance | ||
---|---|---|
290 | 290 |
instance_name = args[0] |
291 | 291 |
|
292 | 292 |
op = opcodes.OpConnectConsole(instance_name=instance_name) |
293 |
node, console_cmd = SubmitOpCode(op)
|
|
293 |
cmd, argv = SubmitOpCode(op)
|
|
294 | 294 |
# drop lock and exec so other commands can run while we have console |
295 | 295 |
utils.Unlock("cmd") |
296 | 296 |
try: |
297 |
os.execv("/usr/bin/ssh", ["ssh", "-qt", node, console_cmd])
|
|
297 |
os.execvp(cmd, argv)
|
|
298 | 298 |
finally: |
299 |
sys.stderr.write("Can't run console command %s on node %s" %
|
|
300 |
(console_cmd, node))
|
|
299 |
sys.stderr.write("Can't run console command %s with arguments:\n'%s'" %
|
|
300 |
(cmd, " ".join(argv)))
|
|
301 | 301 |
os._exit(1) |
302 | 302 |
|
303 | 303 |
|
Also available in: Unified diff