Revision 710bc88c
b/qa/ganeti-qa.py | ||
---|---|---|
553 | 553 |
|
554 | 554 |
qa_config.Load(config_file) |
555 | 555 |
|
556 |
qa_utils.StartMultiplexer(qa_config.GetMasterNode()["primary"]) |
|
556 |
primary = qa_config.GetMasterNode()["primary"] |
|
557 |
qa_utils.StartMultiplexer(primary) |
|
558 |
print ("SSH command for primary node: %s" % |
|
559 |
utils.ShellQuoteArgs(qa_utils.GetSSHCommand(primary, ""))) |
|
560 |
print ("SSH command for other nodes: %s" % |
|
561 |
utils.ShellQuoteArgs(qa_utils.GetSSHCommand("NODE", ""))) |
|
557 | 562 |
try: |
558 | 563 |
RunQa() |
559 | 564 |
finally: |
b/qa/qa_utils.py | ||
---|---|---|
1 | 1 |
# |
2 | 2 |
# |
3 | 3 |
|
4 |
# Copyright (C) 2007, 2011 Google Inc. |
|
4 |
# Copyright (C) 2007, 2011, 2012 Google Inc.
|
|
5 | 5 |
# |
6 | 6 |
# This program is free software; you can redistribute it and/or modify |
7 | 7 |
# it under the terms of the GNU General Public License as published by |
... | ... | |
207 | 207 |
@param tty: if we should use tty; if None, will be auto-detected |
208 | 208 |
|
209 | 209 |
""" |
210 |
args = ["ssh", "-oEscapeChar=none", "-oBatchMode=yes", "-l", "root"]
|
|
210 |
args = ["ssh", "-oEscapeChar=none", "-oBatchMode=yes", "-lroot"] |
|
211 | 211 |
|
212 | 212 |
if tty is None: |
213 | 213 |
tty = sys.stdout.isatty() |
... | ... | |
235 | 235 |
return args |
236 | 236 |
|
237 | 237 |
|
238 |
def StartLocalCommand(cmd, **kwargs): |
|
238 |
def StartLocalCommand(cmd, _nolog_opts=False, **kwargs):
|
|
239 | 239 |
"""Starts a local command. |
240 | 240 |
|
241 | 241 |
""" |
242 |
print "Command: %s" % utils.ShellQuoteArgs(cmd) |
|
242 |
if _nolog_opts: |
|
243 |
pcmd = [i for i in cmd if not i.startswith("-")] |
|
244 |
else: |
|
245 |
pcmd = cmd |
|
246 |
print "Command: %s" % utils.ShellQuoteArgs(pcmd) |
|
243 | 247 |
return subprocess.Popen(cmd, shell=False, **kwargs) |
244 | 248 |
|
245 | 249 |
|
... | ... | |
247 | 251 |
"""Starts SSH. |
248 | 252 |
|
249 | 253 |
""" |
250 |
return StartLocalCommand(GetSSHCommand(node, cmd, strict=strict)) |
|
254 |
return StartLocalCommand(GetSSHCommand(node, cmd, strict=strict), |
|
255 |
_nolog_opts=True) |
|
251 | 256 |
|
252 | 257 |
|
253 | 258 |
def StartMultiplexer(node): |
Also available in: Unified diff