Revision 9486f6ae

b/qa/qa-sample.json
2 2
  "name": "xen-test",
3 3
  "rename": "xen-test-rename",
4 4
  "enabled-hypervisors": "xen-pvm",
5
  "primary_ip_version": 4,
5 6

  
6 7
  "os": "debian-etch",
7 8
  "mem": "512M",
b/qa/qa_cluster.py
1 1
#
2 2
#
3 3

  
4
# Copyright (C) 2007 Google Inc.
4
# Copyright (C) 2007, 2010 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
......
80 80
  # Initialize cluster
81 81
  cmd = ['gnt-cluster', 'init']
82 82

  
83
  cmd.append("--primary-ip-version=%d" %
84
             qa_config.get("primary_ip_version", 4))
85

  
83 86
  if master.get('secondary', None):
84 87
    cmd.append('--secondary-ip=%s' % master['secondary'])
85 88

  
b/qa/qa_env.py
1 1
#
2 2
#
3 3

  
4
# Copyright (C) 2007 Google Inc.
4
# Copyright (C) 2007, 2010 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
......
69 69
  """
70 70
  nodes = qa_config.get('nodes')
71 71

  
72
  pingargs = ['-w', '3', '-c', '1 ']
73
  pingprimary = "ping"
74
  if qa_config.get("primary_ip_version") == 6:
75
    pingprimary = "ping6"
76

  
72 77
  for node in nodes:
73 78
    check = []
74 79
    for i in nodes:
75
      check.append(i['primary'])
80
      cmd = [pingprimary] + pingargs + [i['primary']]
81
      check.append(utils.ShellQuoteArgs(cmd))
76 82
      if i.has_key('secondary'):
77
        check.append(i['secondary'])
78

  
79
    ping = lambda ip: utils.ShellQuoteArgs(['ping', '-w', '3', '-c', '1', ip])
80
    cmd = ' && '.join([ping(i) for i in check])
83
        cmd = ["ping"] + pingargs + [i["secondary"]]
84
        check.append(utils.ShellQuoteArgs(cmd))
81 85

  
82
    AssertEqual(StartSSH(node['primary'], cmd).wait(), 0)
86
    cmdall = ' && '.join(check)
87
    AssertEqual(StartSSH(node['primary'], cmdall).wait(), 0)

Also available in: Unified diff