Merge pull request #1101 from ceph/ci-testing

testing: changes to allow for concurrent functional tests
pull/1115/head
Alfredo Deza 2016-11-22 11:41:05 -05:00 committed by GitHub
commit dcd4e432c3
14 changed files with 46 additions and 34 deletions

32
Vagrantfile vendored
View File

@ -2,6 +2,7 @@
# vi: set ft=ruby :
require 'yaml'
require 'time'
VAGRANTFILE_API_VERSION = '2'
DEBUG = false
@ -31,6 +32,8 @@ USER = settings['ssh_username']
ASSIGN_STATIC_IP = !(BOX == 'openstack' or BOX == 'linode')
DISABLE_SYNCED_FOLDER = settings.fetch('vagrant_disable_synced_folder', false)
DISK_UUID = Time.now.utc.to_i
ansible_provision = proc do |ansible|
if DOCKER then
@ -180,7 +183,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "#{LABEL_PREFIX}client#{i}" do |client|
client.vm.hostname = "#{LABEL_PREFIX}ceph-client#{i}"
if ASSIGN_STATIC_IP
client.vm.network :private_network, ip: "#{PUBLIC_SUBNET}.4#{i}"
client.vm.network :private_network,
ip: "#{PUBLIC_SUBNET}.4#{i}"
end
# Virtualbox
client.vm.provider :virtualbox do |vb|
@ -214,7 +218,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "#{LABEL_PREFIX}rgw#{i}" do |rgw|
rgw.vm.hostname = "#{LABEL_PREFIX}ceph-rgw#{i}"
if ASSIGN_STATIC_IP
rgw.vm.network :private_network, ip: "#{PUBLIC_SUBNET}.5#{i}"
rgw.vm.network :private_network,
ip: "#{PUBLIC_SUBNET}.5#{i}"
end
# Virtualbox
@ -249,7 +254,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "nfs#{i}" do |nfs|
nfs.vm.hostname = "ceph-nfs#{i}"
if ASSIGN_STATIC_IP
nfs.vm.network :private_network, ip: "#{PUBLIC_SUBNET}.6#{i}"
nfs.vm.network :private_network,
ip: "#{PUBLIC_SUBNET}.6#{i}"
end
# Virtualbox
@ -284,7 +290,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "#{LABEL_PREFIX}mds#{i}" do |mds|
mds.vm.hostname = "#{LABEL_PREFIX}ceph-mds#{i}"
if ASSIGN_STATIC_IP
mds.vm.network :private_network, ip: "#{PUBLIC_SUBNET}.7#{i}"
mds.vm.network :private_network,
ip: "#{PUBLIC_SUBNET}.7#{i}"
end
# Virtualbox
mds.vm.provider :virtualbox do |vb|
@ -317,7 +324,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "#{LABEL_PREFIX}rbd_mirror#{i}" do |rbd_mirror|
rbd_mirror.vm.hostname = "#{LABEL_PREFIX}ceph-rbd-mirror#{i}"
if ASSIGN_STATIC_IP
rbd_mirror.vm.network :private_network, ip: "#{PUBLIC_SUBNET}.8#{i}"
rbd_mirror.vm.network :private_network,
ip: "#{PUBLIC_SUBNET}.8#{i}"
end
# Virtualbox
rbd_mirror.vm.provider :virtualbox do |vb|
@ -350,7 +358,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "#{LABEL_PREFIX}iscsi_gw#{i}" do |iscsi_gw|
iscsi_gw.vm.hostname = "#{LABEL_PREFIX}ceph-iscsi-gw#{i}"
if ASSIGN_STATIC_IP
iscsi_gw.vm.network :private_network, ip: "#{PUBLIC_SUBNET}.9#{i}"
iscsi_gw.vm.network :private_network,
ip: "#{PUBLIC_SUBNET}.9#{i}"
end
# Virtualbox
iscsi_gw.vm.provider :virtualbox do |vb|
@ -383,7 +392,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "#{LABEL_PREFIX}mon#{i}" do |mon|
mon.vm.hostname = "#{LABEL_PREFIX}ceph-mon#{i}"
if ASSIGN_STATIC_IP
mon.vm.network :private_network, ip: "#{PUBLIC_SUBNET}.1#{i}"
mon.vm.network :private_network,
ip: "#{PUBLIC_SUBNET}.1#{i}"
end
# Virtualbox
mon.vm.provider :virtualbox do |vb|
@ -417,8 +427,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "#{LABEL_PREFIX}osd#{i}" do |osd|
osd.vm.hostname = "#{LABEL_PREFIX}ceph-osd#{i}"
if ASSIGN_STATIC_IP
osd.vm.network :private_network, ip: "#{PUBLIC_SUBNET}.10#{i}"
osd.vm.network :private_network, ip: "#{CLUSTER_SUBNET}.20#{i}"
osd.vm.network :private_network,
ip: "#{PUBLIC_SUBNET}.10#{i}"
osd.vm.network :private_network,
ip: "#{CLUSTER_SUBNET}.20#{i}"
end
# Virtualbox
osd.vm.provider :virtualbox do |vb|
@ -456,7 +468,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# always make /dev/sd{a/b/c} so that CI can ensure that
# virtualbox and libvirt will have the same devices to use for OSDs
(0..2).each do |d|
lv.storage :file, :device => "hd#{driverletters[d]}", :path => "disk-#{i}-#{d}.disk", :size => '12G', :bus => "ide"
lv.storage :file, :device => "hd#{driverletters[d]}", :path => "disk-#{i}-#{d}-#{DISK_UUID}.disk", :size => '12G', :bus => "ide"
end
lv.memory = MEMORY
lv.random_hostname = true

View File

@ -1,8 +1,8 @@
---
ceph_stable: True
public_network: "192.168.42.0/24"
cluster_network: "192.168.43.0/24"
public_network: "192.168.1.0/24"
cluster_network: "192.168.2.0/24"
journal_size: 100
devices:
- '/dev/sda'

View File

@ -21,8 +21,8 @@ restapi: true
ceph_install_source: stable
# SUBNETS TO USE FOR THE VMS
public_subnet: 192.168.42
cluster_subnet: 192.168.43
public_subnet: 192.168.1
cluster_subnet: 192.168.2
# MEMORY
# set 1024 for CentOS

View File

@ -1,8 +1,8 @@
---
ceph_stable: True
public_network: "192.168.42.0/24"
cluster_network: "192.168.43.0/24"
public_network: "192.168.3.0/24"
cluster_network: "192.168.4.0/24"
journal_size: 100
devices:
- '/dev/sda'

View File

@ -21,8 +21,8 @@ restapi: true
ceph_install_source: stable
# SUBNETS TO USE FOR THE VMS
public_subnet: 192.168.42
cluster_subnet: 192.168.43
public_subnet: 192.168.3
cluster_subnet: 192.168.4
# MEMORY
# set 1024 for CentOS

View File

@ -36,4 +36,4 @@ class TestMon(object):
cluster_name = scenario_config.get('ceph', {}).get('cluster_name', 'ceph')
ceph_conf_path = '/etc/ceph/%s.conf' % cluster_name
initial_members_line = self.get_line_from_config('mon host', ceph_conf_path)
assert initial_members_line == 'mon host = 192.168.42.10,192.168.42.11,192.168.42.12'
assert initial_members_line == 'mon host = 192.168.9.10,192.168.9.11,192.168.9.12'

View File

@ -1,8 +1,8 @@
---
ceph_stable: True
public_network: "192.168.42.0/24"
cluster_network: "192.168.43.0/24"
public_network: "192.168.5.0/24"
cluster_network: "192.168.6.0/24"
journal_size: 100
devices:
- '/dev/sdb'

View File

@ -21,8 +21,8 @@ restapi: true
ceph_install_source: stable
# SUBNETS TO USE FOR THE VMS
public_subnet: 192.168.42
cluster_subnet: 192.168.43
public_subnet: 192.168.5
cluster_subnet: 192.168.6
# MEMORY
# set 1024 for CentOS

View File

@ -1,8 +1,8 @@
---
ceph_stable: True
public_network: "192.168.42.0/24"
cluster_network: "192.168.43.0/24"
public_network: "192.168.7.0/24"
cluster_network: "192.168.8.0/24"
journal_size: 100
devices:
- '/dev/sdb'

View File

@ -21,8 +21,8 @@ restapi: true
ceph_install_source: stable
# SUBNETS TO USE FOR THE VMS
public_subnet: 192.168.42
cluster_subnet: 192.168.43
public_subnet: 192.168.7
cluster_subnet: 192.168.8
# MEMORY
# set 1024 for CentOS

View File

@ -1,8 +1,8 @@
---
ceph_stable: True
public_network: "192.168.42.0/24"
cluster_network: "192.168.43.0/24"
public_network: "192.168.9.0/24"
cluster_network: "192.168.10.0/24"
journal_size: 100
devices:
- '/dev/sdb'

View File

@ -1,4 +1,4 @@
[mons]
mon0 monitor_address=192.168.42.10
mon1 monitor_address=192.168.42.11
mon0 monitor_address=192.168.9.10
mon1 monitor_address=192.168.9.11
mon2 monitor_interface=eth1

View File

@ -21,8 +21,8 @@ restapi: true
ceph_install_source: stable
# SUBNETS TO USE FOR THE VMS
public_subnet: 192.168.42
cluster_subnet: 192.168.43
public_subnet: 192.168.9
cluster_subnet: 192.168.10
# MEMORY
# set 1024 for CentOS

View File

@ -30,7 +30,7 @@ commands=
vagrant up --no-provision {posargs:--provider=virtualbox}
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
timeout 1200 ansible-playbook -vv -i {changedir}/hosts {toxinidir}/site.yml.sample
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/site.yml.sample --extra-vars="fetch_directory={changedir}/fetch"
py.test -v
vagrant destroy --force