From 4a783c2254ce00a953316f0686d49f9c25aa3a46 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Mon, 18 Nov 2019 15:05:16 -0500 Subject: [PATCH 1/9] common: add centos8 support Ceph octopus only supports CentOS 8. This commit adds CentOS 8 support: - update vagrant image in tox configurations. - add CentOS 8 repository for el8 dependencies. - CentOS 8 container engine is podman (same than RHEL 8). - don't use the epel mirror on sepia because it's epel7 only. Signed-off-by: Guillaume Abrioux Co-authored-by: Dimitri Savineau --- group_vars/all.yml.sample | 2 +- group_vars/rhcs.yml.sample | 2 +- .../installs/redhat_community_repository.yml | 1 + .../tasks/installs/redhat_dev_repository.yml | 23 +++++++++++++++++++ roles/ceph-container-engine/tasks/main.yml | 2 +- roles/ceph-container-engine/vars/CentOS-8.yml | 1 + roles/ceph-defaults/defaults/main.yml | 2 +- tests/conftest.py | 2 -- tests/functional/setup.yml | 1 + tox-filestore_to_bluestore.ini | 4 ++-- tox-podman.ini | 9 ++------ tox-update.ini | 4 ++-- tox.ini | 4 ++-- 13 files changed, 38 insertions(+), 19 deletions(-) create mode 120000 roles/ceph-container-engine/vars/CentOS-8.yml diff --git a/group_vars/all.yml.sample b/group_vars/all.yml.sample index 06ca800df9..0f44c4942b 100644 --- a/group_vars/all.yml.sample +++ b/group_vars/all.yml.sample @@ -85,7 +85,7 @@ dummy: #centos_package_dependencies: # - epel-release -# - libselinux-python +# - python3-libselinux #redhat_package_dependencies: [] diff --git a/group_vars/rhcs.yml.sample b/group_vars/rhcs.yml.sample index 33fd858a8f..7bd9c67c46 100644 --- a/group_vars/rhcs.yml.sample +++ b/group_vars/rhcs.yml.sample @@ -85,7 +85,7 @@ fetch_directory: ~/ceph-ansible-keys #centos_package_dependencies: # - epel-release -# - libselinux-python +# - python3-libselinux #redhat_package_dependencies: [] diff --git a/roles/ceph-common/tasks/installs/redhat_community_repository.yml b/roles/ceph-common/tasks/installs/redhat_community_repository.yml index 332491d4a5..aee8fffe93 100644 --- a/roles/ceph-common/tasks/installs/redhat_community_repository.yml +++ b/roles/ceph-common/tasks/installs/redhat_community_repository.yml @@ -5,6 +5,7 @@ register: result until: result is succeeded tags: with_pkg + when: ansible_distribution_major_version | int == 7 - name: configure red hat ceph community repository stable key rpm_key: diff --git a/roles/ceph-common/tasks/installs/redhat_dev_repository.yml b/roles/ceph-common/tasks/installs/redhat_dev_repository.yml index 2b767e9291..85a32a1ab9 100644 --- a/roles/ceph-common/tasks/installs/redhat_dev_repository.yml +++ b/roles/ceph-common/tasks/installs/redhat_dev_repository.yml @@ -1,4 +1,27 @@ --- +- name: install dnf-plugins-core + package: + name: dnf-plugins-core + register: result + until: result is succeeded + tags: with_pkg + +- name: enable ceph-el8 copr + command: dnf copr enable -y ktdreyer/ceph-el8 + args: + creates: /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:ktdreyer:ceph-el8.repo + warn: false + register: result + until: result is succeeded + +- name: enable ceph lab extras repository + yum_repository: + name: lab-extras + baseurl: http://apt-mirror.front.sepia.ceph.com/lab-extras/8/ + description: Sepia Lab Extras repository + enabled: true + gpgcheck: false + - name: fetch ceph red hat development repository uri: # Use the centos repo since we don't currently have a dedicated red hat repo diff --git a/roles/ceph-container-engine/tasks/main.yml b/roles/ceph-container-engine/tasks/main.yml index c6af42601d..d328c124f6 100644 --- a/roles/ceph-container-engine/tasks/main.yml +++ b/roles/ceph-container-engine/tasks/main.yml @@ -1,4 +1,4 @@ --- - name: include pre_requisites/prerequisites.yml include_tasks: pre_requisites/prerequisites.yml - when: not is_atomic + when: not is_atomic | bool diff --git a/roles/ceph-container-engine/vars/CentOS-8.yml b/roles/ceph-container-engine/vars/CentOS-8.yml new file mode 120000 index 0000000000..d49e1cd593 --- /dev/null +++ b/roles/ceph-container-engine/vars/CentOS-8.yml @@ -0,0 +1 @@ +RedHat-8.yml \ No newline at end of file diff --git a/roles/ceph-defaults/defaults/main.yml b/roles/ceph-defaults/defaults/main.yml index 1515bfac40..df2ac751b1 100644 --- a/roles/ceph-defaults/defaults/main.yml +++ b/roles/ceph-defaults/defaults/main.yml @@ -77,7 +77,7 @@ debian_package_dependencies: [] centos_package_dependencies: - epel-release - - libselinux-python + - python3-libselinux redhat_package_dependencies: [] diff --git a/tests/conftest.py b/tests/conftest.py index 032e704a0f..0d8a01e2b6 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -64,8 +64,6 @@ def setup(host): address = host.interface(public_interface).addresses[0] if docker: - container_binary = "docker" - if docker and str_to_bool(os.environ.get('IS_PODMAN', False)): # noqa E501 container_binary = "podman" data = dict( diff --git a/tests/functional/setup.yml b/tests/functional/setup.yml index 3fb6444542..f709940f8e 100644 --- a/tests/functional/setup.yml +++ b/tests/functional/setup.yml @@ -66,6 +66,7 @@ state: absent when: - ansible_distribution == 'CentOS' + - ansible_distribution_major_version | int == 7 - not is_atomic | bool - name: resize logical volume for root partition to fill remaining free space diff --git a/tox-filestore_to_bluestore.ini b/tox-filestore_to_bluestore.ini index 01b5ef2caf..8dd6828401 100644 --- a/tox-filestore_to_bluestore.ini +++ b/tox-filestore_to_bluestore.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/7 - centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/atomic-host + centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/8 + centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/8 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 diff --git a/tox-podman.ini b/tox-podman.ini index 84cbc96cc9..c3a7811826 100644 --- a/tox-podman.ini +++ b/tox-podman.ini @@ -22,12 +22,11 @@ setenv= # only available for ansible >= 2.5 ANSIBLE_STDOUT_CALLBACK = yaml # Set the vagrant box image to use - CEPH_ANSIBLE_VAGRANT_BOX = centos/atomic-host + CEPH_ANSIBLE_VAGRANT_BOX = centos/8 # Set the ansible inventory host file to be used according to which distrib we are running on INVENTORY = {env:_INVENTORY:hosts} - PLAYBOOK = site-docker.yml.sample - IS_PODMAN = TRUE + PLAYBOOK = site-container.yml.sample CEPH_STABLE_RELEASE = nautilus deps= -r{toxinidir}/tests/requirements.txt @@ -48,10 +47,6 @@ commands= ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \ ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \ ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-master} \ - container_binary=podman \ - container_package_name=podman \ - container_service_name=podman \ - container_binding_name=podman \ " # wait 30sec for services to be ready diff --git a/tox-update.ini b/tox-update.ini index 3147c344dd..6103314460 100644 --- a/tox-update.ini +++ b/tox-update.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/7 - centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/atomic-host + centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/8 + centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/8 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 diff --git a/tox.ini b/tox.ini index ce7de02b92..39ad3480c0 100644 --- a/tox.ini +++ b/tox.ini @@ -385,8 +385,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/7 - centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/atomic-host + centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/8 + centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/8 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 From 5795e9d1cc4f6dcebea4f29f1ed2bea0921273dd Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Thu, 19 Dec 2019 12:03:57 -0500 Subject: [PATCH 2/9] ceph-nfs: change ganesha CentOS repository MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since we don't have nfs-ganesha builds available on CentOS 8 at the moment on shaman then we can use the alternative repository at [1] [1] https://download.nfs-ganesha.org/3/LATEST/CentOS Signed-off-by: Dimitri Savineau --- .../pre_requisite_non_container_red_hat.yml | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/roles/ceph-nfs/tasks/pre_requisite_non_container_red_hat.yml b/roles/ceph-nfs/tasks/pre_requisite_non_container_red_hat.yml index eca66bd81d..80b512e5c9 100644 --- a/roles/ceph-nfs/tasks/pre_requisite_non_container_red_hat.yml +++ b/roles/ceph-nfs/tasks/pre_requisite_non_container_red_hat.yml @@ -16,19 +16,23 @@ - name: red hat based systems - dev repo related tasks block: - - name: fetch nfs-ganesha red hat development repository - uri: - url: https://shaman.ceph.com/api/repos/nfs-ganesha/next/latest/{{ ansible_distribution | lower }}/{{ ansible_distribution_major_version }}/flavors/{{ nfs_ganesha_flavor }}/repo - return_content: yes - register: nfs_ganesha_dev_yum_repo + - name: add nfs-ganesha dev repo + yum_repository: + name: nfs-ganesha + baseurl: https://download.nfs-ganesha.org/3/LATEST/CentOS/el-$releasever/$basearch + description: nfs-ganesha repository + gpgcheck: true + gpgkey: https://download.nfs-ganesha.org/3/rsa.pub + file: nfs-ganesha-dev - - name: add nfs-ganesha development repository - copy: - content: "{{ nfs_ganesha_dev_yum_repo.content }}" - dest: /etc/yum.repos.d/nfs-ganesha-dev.repo - owner: root - group: root - backup: yes + - name: add nfs-ganesha dev noarch repo + yum_repository: + name: nfs-ganesha-noarch + baseurl: https://download.nfs-ganesha.org/3/LATEST/CentOS/el-$releasever/noarch + description: nfs-ganesha noarch repository + gpgcheck: true + gpgkey: https://download.nfs-ganesha.org/3/rsa.pub + file: nfs-ganesha-dev when: - nfs_ganesha_dev | bool - ceph_repository == 'dev' From 10e2e0020870158d79718af7925eb3d469dee143 Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Thu, 2 Jan 2020 15:50:24 -0500 Subject: [PATCH 3/9] container: move lvm2 package installation Before this patch, the lvm2 package installation was done during the ceph-osd role. However we were running ceph-volume command in the ceph-config role before ceph-osd. If lvm2 wasn't installed then the ceph-volume command fails: error checking path "/run/lock/lvm": stat /run/lock/lvm: no such file or directory This wasn't visible before because lvm2 was automatically installed as docker dependency but it's not the same for podman on CentOS 8. Signed-off-by: Dimitri Savineau --- .../tasks/pre_requisites/prerequisites.yml | 6 ++++-- roles/ceph-osd/tasks/main.yml | 8 -------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/roles/ceph-container-engine/tasks/pre_requisites/prerequisites.yml b/roles/ceph-container-engine/tasks/pre_requisites/prerequisites.yml index 1bb6deda4a..f4533c4b8d 100644 --- a/roles/ceph-container-engine/tasks/pre_requisites/prerequisites.yml +++ b/roles/ceph-container-engine/tasks/pre_requisites/prerequisites.yml @@ -23,10 +23,12 @@ tags: with_pkg -- name: install container package +- name: install container and lvm2 packages package: - name: ['{{ container_package_name }}', '{{ container_binding_name }}'] + name: ['{{ container_package_name }}', '{{ container_binding_name }}', 'lvm2'] update_cache: true + register: result + until: result is succeeded tags: with_pkg - name: start container service diff --git a/roles/ceph-osd/tasks/main.yml b/roles/ceph-osd/tasks/main.yml index 00a20624a9..e4208e8126 100644 --- a/roles/ceph-osd/tasks/main.yml +++ b/roles/ceph-osd/tasks/main.yml @@ -22,14 +22,6 @@ - ceph_osd_numactl_opts | length > 0 tags: with_pkg -- name: install lvm2 - package: - name: lvm2 - register: result - until: result is succeeded - when: not is_atomic | bool - tags: with_pkg - - name: include_tasks common.yml include_tasks: common.yml From 4118b6bdaeeb6ebb741f634ab569edc962bec8dd Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Mon, 6 Jan 2020 09:09:42 -0500 Subject: [PATCH 4/9] ceph-nfs: add ganesha_t type to selinux Since RHEL 8.1 we need to add the ganesha_t type to the permissive SELinux list. Otherwise the nfs-ganesha service won't start. This was done on RHEL 7 previously and part of the nfs-ganesha-selinux package on RHEL 8. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1786110 Signed-off-by: Dimitri Savineau --- roles/ceph-nfs/tasks/ganesha_selinux_fix.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/roles/ceph-nfs/tasks/ganesha_selinux_fix.yml b/roles/ceph-nfs/tasks/ganesha_selinux_fix.yml index 2d568af0a6..f739b32d7b 100644 --- a/roles/ceph-nfs/tasks/ganesha_selinux_fix.yml +++ b/roles/ceph-nfs/tasks/ganesha_selinux_fix.yml @@ -17,17 +17,16 @@ until: result is succeeded when: ansible_distribution_major_version == '7' - - name: add ganesha_t to permissive domain - selinux_permissive: - name: ganesha_t - permissive: true - failed_when: false - when: ansible_distribution_major_version == '7' - - - name: install nfs-ganesha-selinux on RHEL 8 + - name: install nfs-ganesha-selinux and python3-policycoreutils on RHEL 8 package: - name: nfs-ganesha-selinux + name: ['nfs-ganesha-selinux', 'python3-policycoreutils'] state: present register: result until: result is succeeded when: ansible_distribution_major_version == '8' + + - name: add ganesha_t to permissive domain + selinux_permissive: + name: ganesha_t + permissive: true + failed_when: false From ae938192efed8766c6fd4414890436c47a2b0e86 Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Mon, 6 Jan 2020 11:14:22 -0500 Subject: [PATCH 5/9] tests/functional: change docker to podman Some docker commands were hardcoded in tests playbooks and some conditions were not taking care of the containerized_deployment variable but only the atomic fact. Signed-off-by: Dimitri Savineau --- tests/functional/rbd_map_devices.yml | 18 +++++++++++------- tests/functional/rgw_multisite.yml | 4 ++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/tests/functional/rbd_map_devices.yml b/tests/functional/rbd_map_devices.yml index 8dcaa053d5..47bfc29751 100644 --- a/tests/functional/rbd_map_devices.yml +++ b/tests/functional/rbd_map_devices.yml @@ -28,15 +28,19 @@ - name: create an rbd image - non container command: "rbd create --size=1024 test/rbd_test" delegate_to: "mon0" - when: not is_atomic + when: + - not is_atomic | bool + - not containerized_deployment | default(false) | bool - name: create an rbd image - container - command: "docker run --rm -v /etc/ceph:/etc/ceph --net=host --entrypoint=rbd {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} create --size=1024 test/rbd_test" + command: "podman run --rm -v /etc/ceph:/etc/ceph --net=host --entrypoint=rbd {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} create --size=1024 test/rbd_test" delegate_to: "mon0" - when: is_atomic + when: is_atomic | bool or containerized_deployment | default(false) | bool - name: non container - when: not is_atomic + when: + - not is_atomic | bool + - not containerized_deployment | default(false) | bool block: - name: disable features unsupported by the kernel command: rbd feature disable test/rbd_test object-map fast-diff deep-flatten @@ -45,10 +49,10 @@ command: rbd map test/rbd_test - name: container - when: is_atomic + when: is_atomic | bool or containerized_deployment | default(false) | bool block: - name: disable features unsupported by the kernel - command: "docker run --rm -v /etc/ceph:/etc/ceph --net=host --entrypoint=rbd {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} feature disable test/rbd_test object-map fast-diff deep-flatten" + command: "podman run --rm -v /etc/ceph:/etc/ceph --net=host --entrypoint=rbd {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} feature disable test/rbd_test object-map fast-diff deep-flatten" - name: map a device - command: "docker run --rm --privileged -v /etc/ceph:/etc/ceph -v /dev:/dev --net=host --entrypoint=rbd {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} map test/rbd_test" + command: "podman run --rm --privileged -v /etc/ceph:/etc/ceph -v /dev:/dev --net=host --entrypoint=rbd {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} map test/rbd_test" diff --git a/tests/functional/rgw_multisite.yml b/tests/functional/rgw_multisite.yml index 222c3801e6..984501a5ac 100644 --- a/tests/functional/rgw_multisite.yml +++ b/tests/functional/rgw_multisite.yml @@ -25,7 +25,7 @@ - name: generate and upload a random 10Mb file - containerized deployment command: > - docker run --rm --name=rgw_multisite_test --entrypoint=/bin/bash {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} -c 'dd if=/dev/urandom of=/tmp/testinfra.img bs=1M count=10; {{ s3cmd_cmd }} mb s3://testinfra; {{ s3cmd_cmd }} put /tmp/testinfra.img s3://testinfra' + podman run --rm --name=rgw_multisite_test --entrypoint=/bin/bash {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} -c 'dd if=/dev/urandom of=/tmp/testinfra.img bs=1M count=10; {{ s3cmd_cmd }} mb s3://testinfra; {{ s3cmd_cmd }} put /tmp/testinfra.img s3://testinfra' when: - rgw_zonemaster | bool - containerized_deployment | default(False) | bool @@ -41,7 +41,7 @@ - name: get info from replicated file - containerized deployment command: > - docker run --rm --name=rgw_multisite_test --entrypoint=/bin/bash {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} -c '{{ s3cmd_cmd }} info s3://testinfra/testinfra.img' + podman run --rm --name=rgw_multisite_test --entrypoint=/bin/bash {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} -c '{{ s3cmd_cmd }} info s3://testinfra/testinfra.img' register: s3cmd_info_status when: - not rgw_zonemaster | default(False) | bool From 898008b9e6756f8809a3986c83376494ef85fab8 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Mon, 6 Jan 2020 17:31:46 +0100 Subject: [PATCH 6/9] tests: upgrade from octopus to octopus on master we can't test upgrade from stable-4.0/CentOS 7 to master/CentOS 8. This commit refact the upgrade so we test upgrade from master/CentOS 8 to master/CentOS 8 (octopus to octopus) Signed-off-by: Guillaume Abrioux --- infrastructure-playbooks/rolling_update.yml | 25 ++++----------------- tox-update.ini | 25 ++++++++------------- 2 files changed, 13 insertions(+), 37 deletions(-) diff --git a/infrastructure-playbooks/rolling_update.yml b/infrastructure-playbooks/rolling_update.yml index 04539d1282..782ab1dab7 100644 --- a/infrastructure-playbooks/rolling_update.yml +++ b/infrastructure-playbooks/rolling_update.yml @@ -499,23 +499,6 @@ - noout - nodeep-scrub - - name: get osd versions - command: "{{ container_exec_cmd_update_osd|default('') }} ceph --cluster {{ cluster }} versions" - register: ceph_versions - - - name: set_fact ceph_versions_osd - set_fact: - ceph_versions_osd: "{{ (ceph_versions.stdout|from_json).osd }}" - - # length == 1 means there is a single osds versions entry - # thus all the osds are running the same version - - name: complete osds upgrade - command: "{{ container_exec_cmd_update_osd|default('') }} ceph --cluster {{ cluster }} osd require-osd-release luminous" - when: - - (ceph_versions.get('stdout', '{}')|from_json).get('osd', {}) | length == 1 - - ceph_versions_osd | string is search("ceph version 12") - - - name: upgrade ceph mdss cluster, deactivate all rank > 0 hosts: "{{ groups[mon_group_name|default('mons')][0] }}" become: true @@ -926,14 +909,14 @@ - import_role: name: ceph-facts - - name: container | disallow pre-nautilus OSDs and enable all new nautilus-only functionality - command: "{{ container_binary }} exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }} ceph osd require-osd-release nautilus" + - name: container | disallow pre-octopus OSDs and enable all new octopus-only functionality + command: "{{ container_binary }} exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }} ceph osd require-osd-release octopus" delegate_to: "{{ groups[mon_group_name][0] }}" run_once: True when: containerized_deployment | bool - - name: non container | disallow pre-nautilus OSDs and enable all new nautilus-only functionality - command: "ceph --cluster {{ cluster }} osd require-osd-release nautilus" + - name: non container | disallow pre-octopus OSDs and enable all new octopus-only functionality + command: "ceph --cluster {{ cluster }} osd require-osd-release octopus" delegate_to: "{{ groups[mon_group_name][0] }}" run_once: True when: not containerized_deployment | bool diff --git a/tox-update.ini b/tox-update.ini index 6103314460..bad667f506 100644 --- a/tox-update.ini +++ b/tox-update.ini @@ -31,39 +31,32 @@ setenv= container: PLAYBOOK = site-docker.yml.sample non_container: PLAYBOOK = site.yml.sample - CEPH_DOCKER_IMAGE_TAG = latest-nautilus UPDATE_CEPH_DOCKER_IMAGE_TAG = latest-master UPDATE_CEPH_DEV_BRANCH = master UPDATE_CEPH_DEV_SHA1 = latest - CEPH_STABLE_RELEASE = nautilus ROLLING_UPDATE = True - +deps= -r{toxinidir}/tests/requirements.txt changedir={toxinidir}/tests/functional/all_daemons{env:CONTAINER_DIR:} commands= vagrant up --no-provision {posargs:--provider=virtualbox} bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir} - # use the stable-4.0 branch to deploy a nautilus cluster - git clone -b stable-4.0 --single-branch https://github.com/ceph/ceph-ansible.git {envdir}/tmp/ceph-ansible - pip install -r {envdir}/tmp/ceph-ansible/tests/requirements.txt - - bash -c 'ANSIBLE_CONFIG={envdir}/tmp/ceph-ansible/ansible.cfg ansible-playbook -vv -i {changedir}/{env:INVENTORY} {envdir}/tmp/ceph-ansible/tests/functional/setup.yml' + ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/setup.yml # configure lvm - bash -c 'ANSIBLE_CONFIG={envdir}/tmp/ceph-ansible/ansible.cfg ansible-playbook -vv -i {changedir}/{env:INVENTORY} {envdir}/tmp/ceph-ansible/tests/functional/lvm_setup.yml --extra-vars "osd_scenario=lvm"' + ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/lvm_setup.yml - # deploy the cluster - ansible-playbook -vv -i {envdir}/tmp/ceph-ansible/tests/functional/all_daemons{env:CONTAINER_DIR:}/hosts {envdir}/tmp/ceph-ansible/{env:PLAYBOOK:site.yml.sample} --extra-vars "\ + 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={env:UPDATE_CEPH_DEV_BRANCH:master} ceph_dev_sha1={env:UPDATE_CEPH_DEV_SHA1:latest}" --tags "vagrant_setup" + ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars "\ delegate_facts_host={env:DELEGATE_FACTS_HOST:True} \ fetch_directory={env:FETCH_DIRECTORY:{changedir}/fetch} \ - ceph_stable_release={env:CEPH_STABLE_RELEASE:nautilus} \ ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \ - ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \ - ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-nautilus} \ + ceph_docker_image={env:UPDATE_CEPH_DOCKER_IMAGE:ceph/daemon} \ + ceph_docker_image_tag={env:UPDATE_CEPH_DOCKER_IMAGE_TAG:latest-master} \ + ceph_dev_branch={env:UPDATE_CEPH_DEV_BRANCH:master} \ + ceph_dev_sha1={env:UPDATE_CEPH_DEV_SHA1:latest} \ " - pip install -r {toxinidir}/tests/requirements.txt - 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={env:UPDATE_CEPH_DEV_BRANCH:master} ceph_dev_sha1={env:UPDATE_CEPH_DEV_SHA1:latest}" --tags "vagrant_setup" ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/infrastructure-playbooks/rolling_update.yml --extra-vars "\ ireallymeanit=yes \ fetch_directory={env:FETCH_DIRECTORY:{changedir}/fetch} \ From 09906fa434c40b3c512ea6a97d01b54fc2f7e2ee Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 7 Jan 2020 15:40:50 +0100 Subject: [PATCH 7/9] tests: disable nfs testing nfs-ganesha makes the CI failing because of issue related to SELinux. See: - https://bugzilla.redhat.com/show_bug.cgi?id=1788563 - https://github.com/nfs-ganesha/nfs-ganesha/issues/527 Until we can get this fixed, let's disable nfs-ganesha testing temporarily. Signed-off-by: Guillaume Abrioux --- tests/functional/all_daemons/container/hosts | 4 ++-- tests/functional/all_daemons/container/vagrant_variables.yml | 2 +- tests/functional/all_daemons/hosts | 4 ++-- tests/functional/all_daemons/vagrant_variables.yml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/functional/all_daemons/container/hosts b/tests/functional/all_daemons/container/hosts index 06596f0818..b4882e58e1 100644 --- a/tests/functional/all_daemons/container/hosts +++ b/tests/functional/all_daemons/container/hosts @@ -18,8 +18,8 @@ mds2 [rgws] rgw0 -[nfss] -nfs0 +#[nfss] +#nfs0 [clients] client0 diff --git a/tests/functional/all_daemons/container/vagrant_variables.yml b/tests/functional/all_daemons/container/vagrant_variables.yml index c49adaf904..fbb2861099 100644 --- a/tests/functional/all_daemons/container/vagrant_variables.yml +++ b/tests/functional/all_daemons/container/vagrant_variables.yml @@ -8,7 +8,7 @@ mon_vms: 3 osd_vms: 2 mds_vms: 3 rgw_vms: 1 -nfs_vms: 1 +nfs_vms: 0 grafana_server_vms: 0 rbd_mirror_vms: 1 client_vms: 2 diff --git a/tests/functional/all_daemons/hosts b/tests/functional/all_daemons/hosts index 44e193083b..f0793d95d2 100644 --- a/tests/functional/all_daemons/hosts +++ b/tests/functional/all_daemons/hosts @@ -22,8 +22,8 @@ rgw0 client0 client1 -[nfss] -nfs0 +#[nfss] +#nfs0 [rbdmirrors] rbd-mirror0 diff --git a/tests/functional/all_daemons/vagrant_variables.yml b/tests/functional/all_daemons/vagrant_variables.yml index 0062ac71e5..24824a6644 100644 --- a/tests/functional/all_daemons/vagrant_variables.yml +++ b/tests/functional/all_daemons/vagrant_variables.yml @@ -8,7 +8,7 @@ mon_vms: 3 osd_vms: 2 mds_vms: 3 rgw_vms: 1 -nfs_vms: 1 +nfs_vms: 0 grafana_server_vms: 0 rbd_mirror_vms: 1 client_vms: 2 From c2349e7b3324bb814f12945b6c332295b02b1d39 Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Tue, 7 Jan 2020 10:18:28 -0500 Subject: [PATCH 8/9] ceph-iscsi: remove python rtslib shaman repository The rtslib python library is now available in the distribution so we shouldn't have to use the shaman repository Signed-off-by: Dimitri Savineau --- roles/ceph-iscsi-gw/tasks/non-container/prerequisites.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/roles/ceph-iscsi-gw/tasks/non-container/prerequisites.yml b/roles/ceph-iscsi-gw/tasks/non-container/prerequisites.yml index c1a287069c..6e72b12980 100644 --- a/roles/ceph-iscsi-gw/tasks/non-container/prerequisites.yml +++ b/roles/ceph-iscsi-gw/tasks/non-container/prerequisites.yml @@ -9,7 +9,6 @@ - targetcli common_repos: - tcmu-runner - - python-rtslib - name: set_fact base iscsi pkgs if new style ceph-iscsi set_fact: From 6d231b2881da0b6ad753ea8d7fdd33b0d8e351cf Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Tue, 7 Jan 2020 15:30:16 -0500 Subject: [PATCH 9/9] purge-container-cluster: prune exited containers Remove all stopped/exited containers. Signed-off-by: Dimitri Savineau --- infrastructure-playbooks/purge-container-cluster.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/infrastructure-playbooks/purge-container-cluster.yml b/infrastructure-playbooks/purge-container-cluster.yml index efdd22e806..e76eb43cf6 100644 --- a/infrastructure-playbooks/purge-container-cluster.yml +++ b/infrastructure-playbooks/purge-container-cluster.yml @@ -480,6 +480,12 @@ - import_role: name: ceph-facts + tasks_from: container_binary + + - name: remove stopped/exited containers + command: > + {{ container_binary }} container prune{% if container_binary == 'docker' %} -f{% endif %} + changed_when: false - name: show container list on all the nodes (should be empty) command: >