From bea35c63c83fc2ab87fc983774ed8181cbe74e5b Mon Sep 17 00:00:00 2001 From: Jan Fajerski Date: Wed, 16 Jan 2019 13:48:25 +0100 Subject: [PATCH] ceph-volume: add explicit mixed-type functional tests Signed-off-by: Jan Fajerski --- .../mixed-type-dmcrypt-explicit/Vagrantfile | 1 + .../group_vars/all | 33 ++++++++++ .../mixed-type-dmcrypt-explicit/hosts | 8 +++ .../mixed-type-dmcrypt-explicit/setup.yml | 1 + .../mixed-type-dmcrypt-explicit/test.yml | 1 + .../mixed-type-dmcrypt-explicit/test_zap.yml | 1 + .../vagrant_variables.yml | 56 +++++++++++++++++ .../bluestore/mixed-type-explicit/Vagrantfile | 1 + .../mixed-type-explicit/group_vars/all | 34 ++++++++++ .../bluestore/mixed-type-explicit/hosts | 8 +++ .../bluestore/mixed-type-explicit/setup.yml | 1 + .../bluestore/mixed-type-explicit/test.yml | 1 + .../mixed-type-explicit/test_zap.yml | 1 + .../mixed-type-explicit/vagrant_variables.yml | 56 +++++++++++++++++ .../mixed-type-dmcrypt-explicit/Vagrantfile | 1 + .../group_vars/all | 33 ++++++++++ .../mixed-type-dmcrypt-explicit/hosts | 8 +++ .../mixed-type-dmcrypt-explicit/setup.yml | 1 + .../mixed-type-dmcrypt-explicit/test.yml | 1 + .../mixed-type-dmcrypt-explicit/test_zap.yml | 1 + .../vagrant_variables.yml | 56 +++++++++++++++++ .../filestore/mixed-type-explicit/Vagrantfile | 1 + .../mixed-type-explicit/group_vars/all | 32 ++++++++++ .../filestore/mixed-type-explicit/hosts | 8 +++ .../filestore/mixed-type-explicit/setup.yml | 1 + .../filestore/mixed-type-explicit/test.yml | 1 + .../mixed-type-explicit/test_zap.yml | 1 + .../mixed-type-explicit/vagrant_variables.yml | 56 +++++++++++++++++ .../batch/playbooks/test_explicit.yml | 63 +++++++++++++++++++ .../tests/functional/batch/tox.ini | 8 ++- 30 files changed, 473 insertions(+), 2 deletions(-) create mode 120000 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/Vagrantfile create mode 100644 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/group_vars/all create mode 100644 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/hosts create mode 120000 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/setup.yml create mode 120000 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/test.yml create mode 120000 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/test_zap.yml create mode 100644 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/vagrant_variables.yml create mode 120000 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/Vagrantfile create mode 100644 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/group_vars/all create mode 100644 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/hosts create mode 120000 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/setup.yml create mode 120000 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/test.yml create mode 120000 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/test_zap.yml create mode 100644 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/vagrant_variables.yml create mode 120000 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/Vagrantfile create mode 100644 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/group_vars/all create mode 100644 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/hosts create mode 120000 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/setup.yml create mode 120000 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/test.yml create mode 120000 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/test_zap.yml create mode 100644 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/vagrant_variables.yml create mode 120000 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/Vagrantfile create mode 100644 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/group_vars/all create mode 100644 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/hosts create mode 120000 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/setup.yml create mode 120000 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/test.yml create mode 120000 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/test_zap.yml create mode 100644 src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/vagrant_variables.yml create mode 100644 src/ceph-volume/ceph_volume/tests/functional/batch/playbooks/test_explicit.yml diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/Vagrantfile b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/Vagrantfile new file mode 120000 index 0000000000000..16076e424520c --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/Vagrantfile @@ -0,0 +1 @@ +../../../../Vagrantfile \ No newline at end of file diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/group_vars/all b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/group_vars/all new file mode 100644 index 0000000000000..ae65f9b51453c --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/group_vars/all @@ -0,0 +1,33 @@ +--- + +ceph_dev: True +cluster: test +public_network: "192.168.3.0/24" +cluster_network: "192.168.4.0/24" +monitor_interface: eth1 +osd_objectstore: "bluestore" +osd_scenario: lvm +dmcrypt: true +num_osds: 2 +ceph_origin: 'repository' +ceph_repository: 'dev' +copy_admin_key: false +devices: + - /dev/sdb + - /dev/sdc + - /dev/nvme0n1 + - /dev/nvme1n1 +os_tuning_params: + - { name: kernel.pid_max, value: 4194303 } + - { name: fs.file-max, value: 26234859 } +ceph_conf_overrides: + global: + osd_pool_default_pg_num: 8 + osd_pool_default_size: 1 + +# The following is only needed for testing purposes and is not part of +# ceph-ansible supported variables + +osd_ids: + - 0 + - 1 diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/hosts b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/hosts new file mode 100644 index 0000000000000..e1c1de6f821a2 --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/hosts @@ -0,0 +1,8 @@ +[mons] +mon0 + +[osds] +osd0 + +[mgrs] +mon0 diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/setup.yml b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/setup.yml new file mode 120000 index 0000000000000..8cf11d4ef8eb1 --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/setup.yml @@ -0,0 +1 @@ +../../../playbooks/setup_mixed_type.yml \ No newline at end of file diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/test.yml b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/test.yml new file mode 120000 index 0000000000000..66d44c728e10c --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/test.yml @@ -0,0 +1 @@ +../../../playbooks/test_explicit.yml \ No newline at end of file diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/test_zap.yml b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/test_zap.yml new file mode 120000 index 0000000000000..cb969fa1de6aa --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/test_zap.yml @@ -0,0 +1 @@ +../../../playbooks/test_zap.yml \ No newline at end of file diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/vagrant_variables.yml b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/vagrant_variables.yml new file mode 100644 index 0000000000000..7d1a4449a634c --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-dmcrypt-explicit/vagrant_variables.yml @@ -0,0 +1,56 @@ +--- + +# DEFINE THE NUMBER OF VMS TO RUN +mon_vms: 1 +osd_vms: 1 +mds_vms: 0 +rgw_vms: 0 +nfs_vms: 0 +rbd_mirror_vms: 0 +client_vms: 0 +iscsi_gw_vms: 0 +mgr_vms: 0 + +# SUBNETS TO USE FOR THE VMS +public_subnet: 192.168.3 +cluster_subnet: 192.168.4 + +# MEMORY +# set 1024 for CentOS +memory: 512 + +# Ethernet interface name +# use eth1 for libvirt and ubuntu precise, enp0s8 for CentOS and ubuntu xenial +eth: 'eth1' + + +# VAGRANT BOX +# Ceph boxes are *strongly* suggested. They are under better control and will +# not get updated frequently unless required for build systems. These are (for +# now): +# +# * ceph/ubuntu-xenial +# +# Ubuntu: ceph/ubuntu-xenial bento/ubuntu-16.04 or ubuntu/trusty64 or ubuntu/wily64 +# CentOS: bento/centos-7.1 or puppetlabs/centos-7.0-64-puppet +# libvirt CentOS: centos/7 +# parallels Ubuntu: parallels/ubuntu-14.04 +# Debian: deb/jessie-amd64 - be careful the storage controller is named 'SATA Controller' +# For more boxes have a look at: +# - https://atlas.hashicorp.com/boxes/search?utf8=✓&sort=&provider=virtualbox&q= +# - https://download.gluster.org/pub/gluster/purpleidea/vagrant/ +vagrant_box: centos/7 +#ssh_private_key_path: "~/.ssh/id_rsa" +# The sync directory changes based on vagrant box +# Set to /home/vagrant/sync for Centos/7, /home/{ user }/vagrant for openstack and defaults to /vagrant +#vagrant_sync_dir: /home/vagrant/sync +#vagrant_sync_dir: / +# Disables synced folder creation. Not needed for testing, will skip mounting +# the vagrant directory on the remote box regardless of the provider. +vagrant_disable_synced_folder: true +# VAGRANT URL +# This is a URL to download an image from an alternate location. vagrant_box +# above should be set to the filename of the image. +# Fedora virtualbox: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-virtualbox.box +# Fedora libvirt: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-libvirt.box +# vagrant_box_url: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-virtualbox.box diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/Vagrantfile b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/Vagrantfile new file mode 120000 index 0000000000000..16076e424520c --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/Vagrantfile @@ -0,0 +1 @@ +../../../../Vagrantfile \ No newline at end of file diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/group_vars/all b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/group_vars/all new file mode 100644 index 0000000000000..c2e356fef7321 --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/group_vars/all @@ -0,0 +1,34 @@ +--- + +ceph_dev: True +cluster: test +public_network: "192.168.3.0/24" +cluster_network: "192.168.4.0/24" +monitor_interface: eth1 +osd_objectstore: "bluestore" +osd_scenario: lvm +num_osds: 2 +ceph_origin: 'repository' +ceph_repository: 'dev' +copy_admin_key: false +devices: + - /dev/sdb + - /dev/sdc + - /dev/nvme0n1 + - /dev/nvme1n1 +os_tuning_params: + - { name: kernel.pid_max, value: 4194303 } + - { name: fs.file-max, value: 26234859 } +ceph_conf_overrides: + global: + osd_pool_default_pg_num: 8 + osd_pool_default_size: 1 +# 9GB in bytes +block_db_size: 9663676416 + +# The following is only needed for testing purposes and is not part of +# ceph-ansible supported variables + +osd_ids: + - 0 + - 1 diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/hosts b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/hosts new file mode 100644 index 0000000000000..e1c1de6f821a2 --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/hosts @@ -0,0 +1,8 @@ +[mons] +mon0 + +[osds] +osd0 + +[mgrs] +mon0 diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/setup.yml b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/setup.yml new file mode 120000 index 0000000000000..8cf11d4ef8eb1 --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/setup.yml @@ -0,0 +1 @@ +../../../playbooks/setup_mixed_type.yml \ No newline at end of file diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/test.yml b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/test.yml new file mode 120000 index 0000000000000..66d44c728e10c --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/test.yml @@ -0,0 +1 @@ +../../../playbooks/test_explicit.yml \ No newline at end of file diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/test_zap.yml b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/test_zap.yml new file mode 120000 index 0000000000000..cb969fa1de6aa --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/test_zap.yml @@ -0,0 +1 @@ +../../../playbooks/test_zap.yml \ No newline at end of file diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/vagrant_variables.yml b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/vagrant_variables.yml new file mode 100644 index 0000000000000..7d1a4449a634c --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/bluestore/mixed-type-explicit/vagrant_variables.yml @@ -0,0 +1,56 @@ +--- + +# DEFINE THE NUMBER OF VMS TO RUN +mon_vms: 1 +osd_vms: 1 +mds_vms: 0 +rgw_vms: 0 +nfs_vms: 0 +rbd_mirror_vms: 0 +client_vms: 0 +iscsi_gw_vms: 0 +mgr_vms: 0 + +# SUBNETS TO USE FOR THE VMS +public_subnet: 192.168.3 +cluster_subnet: 192.168.4 + +# MEMORY +# set 1024 for CentOS +memory: 512 + +# Ethernet interface name +# use eth1 for libvirt and ubuntu precise, enp0s8 for CentOS and ubuntu xenial +eth: 'eth1' + + +# VAGRANT BOX +# Ceph boxes are *strongly* suggested. They are under better control and will +# not get updated frequently unless required for build systems. These are (for +# now): +# +# * ceph/ubuntu-xenial +# +# Ubuntu: ceph/ubuntu-xenial bento/ubuntu-16.04 or ubuntu/trusty64 or ubuntu/wily64 +# CentOS: bento/centos-7.1 or puppetlabs/centos-7.0-64-puppet +# libvirt CentOS: centos/7 +# parallels Ubuntu: parallels/ubuntu-14.04 +# Debian: deb/jessie-amd64 - be careful the storage controller is named 'SATA Controller' +# For more boxes have a look at: +# - https://atlas.hashicorp.com/boxes/search?utf8=✓&sort=&provider=virtualbox&q= +# - https://download.gluster.org/pub/gluster/purpleidea/vagrant/ +vagrant_box: centos/7 +#ssh_private_key_path: "~/.ssh/id_rsa" +# The sync directory changes based on vagrant box +# Set to /home/vagrant/sync for Centos/7, /home/{ user }/vagrant for openstack and defaults to /vagrant +#vagrant_sync_dir: /home/vagrant/sync +#vagrant_sync_dir: / +# Disables synced folder creation. Not needed for testing, will skip mounting +# the vagrant directory on the remote box regardless of the provider. +vagrant_disable_synced_folder: true +# VAGRANT URL +# This is a URL to download an image from an alternate location. vagrant_box +# above should be set to the filename of the image. +# Fedora virtualbox: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-virtualbox.box +# Fedora libvirt: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-libvirt.box +# vagrant_box_url: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-virtualbox.box diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/Vagrantfile b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/Vagrantfile new file mode 120000 index 0000000000000..16076e424520c --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/Vagrantfile @@ -0,0 +1 @@ +../../../../Vagrantfile \ No newline at end of file diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/group_vars/all b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/group_vars/all new file mode 100644 index 0000000000000..006e9b85b60ac --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/group_vars/all @@ -0,0 +1,33 @@ +--- + +ceph_dev: True +cluster: test +public_network: "192.168.3.0/24" +cluster_network: "192.168.4.0/24" +monitor_interface: eth1 +osd_objectstore: "filestore" +osd_scenario: lvm +dmcrypt: true +ceph_origin: 'repository' +ceph_repository: 'dev' +copy_admin_key: false +num_osds: 2 +devices: + - /dev/sdb + - /dev/sdc + - /dev/nvme0n1 + - /dev/nvme1n1 +os_tuning_params: + - { name: kernel.pid_max, value: 4194303 } + - { name: fs.file-max, value: 26234859 } +ceph_conf_overrides: + global: + osd_pool_default_pg_num: 8 + osd_pool_default_size: 1 + +# The following is only needed for testing purposes and is not part of +# ceph-ansible supported variables + +osd_ids: + - 0 + - 1 diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/hosts b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/hosts new file mode 100644 index 0000000000000..e1c1de6f821a2 --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/hosts @@ -0,0 +1,8 @@ +[mons] +mon0 + +[osds] +osd0 + +[mgrs] +mon0 diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/setup.yml b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/setup.yml new file mode 120000 index 0000000000000..8cf11d4ef8eb1 --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/setup.yml @@ -0,0 +1 @@ +../../../playbooks/setup_mixed_type.yml \ No newline at end of file diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/test.yml b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/test.yml new file mode 120000 index 0000000000000..66d44c728e10c --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/test.yml @@ -0,0 +1 @@ +../../../playbooks/test_explicit.yml \ No newline at end of file diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/test_zap.yml b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/test_zap.yml new file mode 120000 index 0000000000000..cb969fa1de6aa --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/test_zap.yml @@ -0,0 +1 @@ +../../../playbooks/test_zap.yml \ No newline at end of file diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/vagrant_variables.yml b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/vagrant_variables.yml new file mode 100644 index 0000000000000..7d1a4449a634c --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-dmcrypt-explicit/vagrant_variables.yml @@ -0,0 +1,56 @@ +--- + +# DEFINE THE NUMBER OF VMS TO RUN +mon_vms: 1 +osd_vms: 1 +mds_vms: 0 +rgw_vms: 0 +nfs_vms: 0 +rbd_mirror_vms: 0 +client_vms: 0 +iscsi_gw_vms: 0 +mgr_vms: 0 + +# SUBNETS TO USE FOR THE VMS +public_subnet: 192.168.3 +cluster_subnet: 192.168.4 + +# MEMORY +# set 1024 for CentOS +memory: 512 + +# Ethernet interface name +# use eth1 for libvirt and ubuntu precise, enp0s8 for CentOS and ubuntu xenial +eth: 'eth1' + + +# VAGRANT BOX +# Ceph boxes are *strongly* suggested. They are under better control and will +# not get updated frequently unless required for build systems. These are (for +# now): +# +# * ceph/ubuntu-xenial +# +# Ubuntu: ceph/ubuntu-xenial bento/ubuntu-16.04 or ubuntu/trusty64 or ubuntu/wily64 +# CentOS: bento/centos-7.1 or puppetlabs/centos-7.0-64-puppet +# libvirt CentOS: centos/7 +# parallels Ubuntu: parallels/ubuntu-14.04 +# Debian: deb/jessie-amd64 - be careful the storage controller is named 'SATA Controller' +# For more boxes have a look at: +# - https://atlas.hashicorp.com/boxes/search?utf8=✓&sort=&provider=virtualbox&q= +# - https://download.gluster.org/pub/gluster/purpleidea/vagrant/ +vagrant_box: centos/7 +#ssh_private_key_path: "~/.ssh/id_rsa" +# The sync directory changes based on vagrant box +# Set to /home/vagrant/sync for Centos/7, /home/{ user }/vagrant for openstack and defaults to /vagrant +#vagrant_sync_dir: /home/vagrant/sync +#vagrant_sync_dir: / +# Disables synced folder creation. Not needed for testing, will skip mounting +# the vagrant directory on the remote box regardless of the provider. +vagrant_disable_synced_folder: true +# VAGRANT URL +# This is a URL to download an image from an alternate location. vagrant_box +# above should be set to the filename of the image. +# Fedora virtualbox: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-virtualbox.box +# Fedora libvirt: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-libvirt.box +# vagrant_box_url: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-virtualbox.box diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/Vagrantfile b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/Vagrantfile new file mode 120000 index 0000000000000..16076e424520c --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/Vagrantfile @@ -0,0 +1 @@ +../../../../Vagrantfile \ No newline at end of file diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/group_vars/all b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/group_vars/all new file mode 100644 index 0000000000000..0b287c58aa659 --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/group_vars/all @@ -0,0 +1,32 @@ +--- + +ceph_dev: True +cluster: test +public_network: "192.168.3.0/24" +cluster_network: "192.168.4.0/24" +monitor_interface: eth1 +osd_objectstore: "filestore" +osd_scenario: lvm +ceph_origin: 'repository' +ceph_repository: 'dev' +copy_admin_key: false +num_osds: 2 +devices: + - /dev/sdb + - /dev/sdc + - /dev/nvme0n1 + - /dev/nvme1n1 +os_tuning_params: + - { name: kernel.pid_max, value: 4194303 } + - { name: fs.file-max, value: 26234859 } +ceph_conf_overrides: + global: + osd_pool_default_pg_num: 8 + osd_pool_default_size: 1 + +# The following is only needed for testing purposes and is not part of +# ceph-ansible supported variables + +osd_ids: + - 0 + - 1 diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/hosts b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/hosts new file mode 100644 index 0000000000000..e1c1de6f821a2 --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/hosts @@ -0,0 +1,8 @@ +[mons] +mon0 + +[osds] +osd0 + +[mgrs] +mon0 diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/setup.yml b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/setup.yml new file mode 120000 index 0000000000000..8cf11d4ef8eb1 --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/setup.yml @@ -0,0 +1 @@ +../../../playbooks/setup_mixed_type.yml \ No newline at end of file diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/test.yml b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/test.yml new file mode 120000 index 0000000000000..66d44c728e10c --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/test.yml @@ -0,0 +1 @@ +../../../playbooks/test_explicit.yml \ No newline at end of file diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/test_zap.yml b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/test_zap.yml new file mode 120000 index 0000000000000..cb969fa1de6aa --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/test_zap.yml @@ -0,0 +1 @@ +../../../playbooks/test_zap.yml \ No newline at end of file diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/vagrant_variables.yml b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/vagrant_variables.yml new file mode 100644 index 0000000000000..7d1a4449a634c --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/centos7/filestore/mixed-type-explicit/vagrant_variables.yml @@ -0,0 +1,56 @@ +--- + +# DEFINE THE NUMBER OF VMS TO RUN +mon_vms: 1 +osd_vms: 1 +mds_vms: 0 +rgw_vms: 0 +nfs_vms: 0 +rbd_mirror_vms: 0 +client_vms: 0 +iscsi_gw_vms: 0 +mgr_vms: 0 + +# SUBNETS TO USE FOR THE VMS +public_subnet: 192.168.3 +cluster_subnet: 192.168.4 + +# MEMORY +# set 1024 for CentOS +memory: 512 + +# Ethernet interface name +# use eth1 for libvirt and ubuntu precise, enp0s8 for CentOS and ubuntu xenial +eth: 'eth1' + + +# VAGRANT BOX +# Ceph boxes are *strongly* suggested. They are under better control and will +# not get updated frequently unless required for build systems. These are (for +# now): +# +# * ceph/ubuntu-xenial +# +# Ubuntu: ceph/ubuntu-xenial bento/ubuntu-16.04 or ubuntu/trusty64 or ubuntu/wily64 +# CentOS: bento/centos-7.1 or puppetlabs/centos-7.0-64-puppet +# libvirt CentOS: centos/7 +# parallels Ubuntu: parallels/ubuntu-14.04 +# Debian: deb/jessie-amd64 - be careful the storage controller is named 'SATA Controller' +# For more boxes have a look at: +# - https://atlas.hashicorp.com/boxes/search?utf8=✓&sort=&provider=virtualbox&q= +# - https://download.gluster.org/pub/gluster/purpleidea/vagrant/ +vagrant_box: centos/7 +#ssh_private_key_path: "~/.ssh/id_rsa" +# The sync directory changes based on vagrant box +# Set to /home/vagrant/sync for Centos/7, /home/{ user }/vagrant for openstack and defaults to /vagrant +#vagrant_sync_dir: /home/vagrant/sync +#vagrant_sync_dir: / +# Disables synced folder creation. Not needed for testing, will skip mounting +# the vagrant directory on the remote box regardless of the provider. +vagrant_disable_synced_folder: true +# VAGRANT URL +# This is a URL to download an image from an alternate location. vagrant_box +# above should be set to the filename of the image. +# Fedora virtualbox: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-virtualbox.box +# Fedora libvirt: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-libvirt.box +# vagrant_box_url: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-virtualbox.box diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/playbooks/test_explicit.yml b/src/ceph-volume/ceph_volume/tests/functional/batch/playbooks/test_explicit.yml new file mode 100644 index 0000000000000..853f6a1cb6861 --- /dev/null +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/playbooks/test_explicit.yml @@ -0,0 +1,63 @@ + +- hosts: osds + become: yes + tasks: + + - name: stop ceph-osd daemons + service: + name: "ceph-osd@{{ item }}" + state: stopped + with_items: "{{ osd_ids }}" + + +- hosts: mons + become: yes + tasks: + + - name: purge osds + command: "ceph --cluster {{ cluster }} osd purge osd.{{ item }} --yes-i-really-mean-it" + with_items: "{{ osd_ids }}" + + +- hosts: osds + become: yes + tasks: + + - name: zap devices used for OSDs + command: "ceph-volume --cluster {{ cluster }} lvm zap {{ item }} --destroy" + with_items: "{{ devices }}" + environment: + CEPH_VOLUME_DEBUG: 1 + + - name: batch create devices again + command: "ceph-volume --cluster {{ cluster }} lvm batch --yes --{{ osd_objectstore|default('bluestore') }} {{ '--dmcrypt' if dmcrypt|default(false) else '' }} {{ devices[:2] | join(' ') }} --db-devices {{ devices[2:] | join(' ') }}" + environment: + CEPH_VOLUME_DEBUG: 1 + + - name: ensure batch create is idempotent + command: "ceph-volume --cluster {{ cluster }} lvm batch --yes --{{ osd_objectstore|default('bluestore') }} {{ '--dmcrypt' if dmcrypt|default(false) else '' }} {{ devices[:2] | join(' ') }} --db-devices {{ devices[2:] | join(' ') }}" + register: batch_cmd + failed_when: false + environment: + CEPH_VOLUME_DEBUG: 1 + + - name: check batch idempotency + fail: + msg: "lvm batch failed idempotency check" + when: + - batch_cmd.rc != 0 + - "'strategy changed' not in batch_cmd.stdout" + + - name: run batch --report to see if devices get filtered + command: "ceph-volume --cluster {{ cluster }} lvm batch --report --format=json --{{ osd_objectstore|default('bluestore') }} {{ '--dmcrypt' if dmcrypt|default(false) else '' }} {{ devices[:2] | join(' ') }} --db-devices {{ devices[2:] | join(' ') }}" + register: report_cmd + failed_when: false + environment: + CEPH_VOLUME_DEBUG: 1 + + - name: check batch --report idempotency + fail: + msg: "lvm batch --report failed idempotency check" + when: + - batch_cmd.rc != 0 + - "'strategy changed' not in batch_cmd.stdout" diff --git a/src/ceph-volume/ceph_volume/tests/functional/batch/tox.ini b/src/ceph-volume/ceph_volume/tests/functional/batch/tox.ini index 4c3af68115702..7e1ae2a79ee1d 100644 --- a/src/ceph-volume/ceph_volume/tests/functional/batch/tox.ini +++ b/src/ceph-volume/ceph_volume/tests/functional/batch/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = {centos7,xenial}-{bluestore,filestore}-{single_type,single_type_dmcrypt},centos7-{bluestore,filestore}-{mixed_type, mixed_type_dmcrypt} +envlist = {centos7,xenial}-{bluestore,filestore}-{single_type,single_type_dmcrypt},centos7-{bluestore,filestore}-{mixed_type,mixed_type_dmcrypt,mixed_type_explicit, mixed_type_dmcrypt_explicit} skipsdist = True [testenv] @@ -22,17 +22,21 @@ changedir= centos7-filestore-single_type_dmcrypt: {toxinidir}/centos7/filestore/single-type-dmcrypt centos7-filestore-mixed_type: {toxinidir}/centos7/filestore/mixed-type centos7-filestore-mixed_type_dmcrypt: {toxinidir}/centos7/filestore/mixed-type-dmcrypt + centos7-filestore-mixed_type_explicit: {toxinidir}/centos7/filestore/mixed-type-explicit + centos7-filestore-mixed_type_dmcrypt_explicit: {toxinidir}/centos7/filestore/mixed-type-dmcrypt-explicit centos7-bluestore-single_type: {toxinidir}/centos7/bluestore/single-type centos7-bluestore-single_type_dmcrypt: {toxinidir}/centos7/bluestore/single-type-dmcrypt centos7-bluestore-mixed_type: {toxinidir}/centos7/bluestore/mixed-type centos7-bluestore-mixed_type_dmcrypt: {toxinidir}/centos7/bluestore/mixed-type-dmcrypt + centos7-bluestore-mixed_type_explicit: {toxinidir}/centos7/bluestore/mixed-type-explicit + centos7-bluestore-mixed_type_dmcrypt_explicit: {toxinidir}/centos7/bluestore/mixed-type-dmcrypt-explicit xenial-filestore-single_type: {toxinidir}/xenial/filestore/single-type xenial-filestore-single_type_dmcrypt: {toxinidir}/xenial/filestore/single-type-dmcrypt xenial-bluestore-single_type: {toxinidir}/xenial/bluestore/single-type xenial-bluestore-single_type_dmcrypt: {toxinidir}/xenial/bluestore/single-type-dmcrypt commands= git clone -b {env:CEPH_ANSIBLE_BRANCH:master} --single-branch https://github.com/ceph/ceph-ansible.git {envdir}/tmp/ceph-ansible - pip install -r {envdir}/tmp/ceph-ansible/tests/requirements.txt + python -m pip install -r {envdir}/tmp/ceph-ansible/tests/requirements.txt bash {toxinidir}/../scripts/vagrant_up.sh {env:VAGRANT_UP_FLAGS:"--no-provision"} {posargs:--provider=virtualbox} bash {toxinidir}/../scripts/generate_ssh_config.sh {changedir} -- 2.39.5