From 1b33c5358ebc53c1c9c1baf6953a3bfa0d7bf9b4 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Fri, 31 Jan 2020 11:51:54 +0100 Subject: [PATCH] config: fix external client scenario When no monitor group is present in the inventory, this task fails. This affects only non-containerized deployments. Signed-off-by: Guillaume Abrioux (cherry picked from commit e7bc0794054008ac2d6771f0d29d275493319665) --- roles/ceph-config/tasks/main.yml | 2 +- tox-external_clients.ini | 17 +++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/roles/ceph-config/tasks/main.yml b/roles/ceph-config/tasks/main.yml index 7df8d17aa..9b37f0e45 100644 --- a/roles/ceph-config/tasks/main.yml +++ b/roles/ceph-config/tasks/main.yml @@ -137,7 +137,7 @@ config_overrides: "{{ ceph_conf_overrides }}" config_type: ini when: - - inventory_hostname in groups[mon_group_name] + - inventory_hostname in groups.get(mon_group_name, []) - ceph_conf_local | bool - name: config file operations for containerized scenarios diff --git a/tox-external_clients.ini b/tox-external_clients.ini index cbfa8c4b8..9ad147ceb 100644 --- a/tox-external_clients.ini +++ b/tox-external_clients.ini @@ -20,8 +20,8 @@ setenv= ANSIBLE_STDOUT_CALLBACK = yaml # non_container: DEV_SETUP = True # Set the vagrant box image to use - centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/8 - centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/8 + centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/7 + centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/7 ubuntu: CEPH_ANSIBLE_VAGRANT_BOX = guits/ubuntu-bionic64 # Set the ansible inventory host file to be used according to which distrib we are running on @@ -42,15 +42,13 @@ commands= # configure lvm ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/lvm_setup.yml - non_container: ansible-playbook -vv -i "localhost," -c local {toxinidir}/tests/functional/dev_setup.yml --extra-vars "dev_setup=True change_dir={changedir} ceph_dev_branch=master ceph_dev_sha1=latest" --tags "vagrant_setup" ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/{env:PLAYBOOK:site.yml.sample} --limit 'all:!clients' --extra-vars "\ delegate_facts_host={env:DELEGATE_FACTS_HOST:True} \ fetch_directory={env:FETCH_DIRECTORY:{changedir}/fetch} \ + ceph_stable_release=nautilus \ ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \ ceph_docker_image=ceph/daemon \ - ceph_docker_image_tag=latest-master \ - ceph_dev_branch=master \ - ceph_dev_sha1=latest \ + ceph_docker_image_tag=latest-nautilus \ " ansible-playbook -vv -i {changedir}/external_clients-hosts {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars "\ @@ -59,13 +57,12 @@ commands= fsid=40358a87-ab6e-4bdc-83db-1d909147861c \ external_cluster_mon_ips=192.168.31.10,192.168.31.11,192.168.31.12 \ generate_fsid=false \ + ceph_stable_release=nautilus \ ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \ ceph_docker_image=ceph/daemon \ - ceph_docker_image_tag=latest-master \ - ceph_dev_branch=master \ - ceph_dev_sha1=latest \ + ceph_docker_image_tag=latest-nautilus \ " - bash -c "CEPH_STABLE_RELEASE={env:UPDATE_CEPH_STABLE_RELEASE:octopus} py.test --reruns 5 --reruns-delay 1 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests" + bash -c "CEPH_STABLE_RELEASE=nautilus py.test --reruns 5 --reruns-delay 1 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests" vagrant destroy --force