Revision 50eaa5da
b/qa/qa_utils.py | ||
---|---|---|
41 | 41 |
from ganeti import constants |
42 | 42 |
from ganeti import ht |
43 | 43 |
from ganeti import pathutils |
44 |
from ganeti import vcluster |
|
44 | 45 |
|
45 | 46 |
import qa_config |
46 | 47 |
import qa_error |
... | ... | |
250 | 251 |
spath = _MULTIPLEXERS[node][0] |
251 | 252 |
args.append("-oControlPath=%s" % spath) |
252 | 253 |
args.append("-oControlMaster=no") |
253 |
args.append(node) |
|
254 |
if cmd: |
|
255 |
args.append(cmd) |
|
254 |
|
|
255 |
(vcluster_master, vcluster_basedir) = \ |
|
256 |
qa_config.GetVclusterSettings() |
|
257 |
|
|
258 |
if vcluster_master: |
|
259 |
args.append(vcluster_master) |
|
260 |
args.append("%s/%s/cmd" % (vcluster_basedir, node)) |
|
261 |
|
|
262 |
if cmd: |
|
263 |
# For virtual clusters the whole command must be wrapped using the "cmd" |
|
264 |
# script, as that script sets a number of environment variables. If the |
|
265 |
# command contains shell meta characters the whole command needs to be |
|
266 |
# quoted. |
|
267 |
args.append(utils.ShellQuote(cmd)) |
|
268 |
else: |
|
269 |
args.append(node) |
|
270 |
|
|
271 |
if cmd: |
|
272 |
args.append(cmd) |
|
256 | 273 |
|
257 | 274 |
return args |
258 | 275 |
|
Also available in: Unified diff