]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: use nfs + cephfs instead of rgw in update job
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 14 Jun 2021 12:08:32 +0000 (14:08 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 16 Jun 2021 17:39:42 +0000 (19:39 +0200)
Since nfs+rgw isn't going to be supported in Ceph Pacific, let's not
cover this in the CI.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
tests/conftest.py
tests/functional/tests/nfs/test_nfs_ganesha.py
tox-update.ini

index 7713415a2d637accdf59786df7b1a42ab0e8fc9f..dfd16755201080f95f194f4cf6d4845519cc1294 100644 (file)
@@ -146,6 +146,9 @@ def node(host, request):
     if request.node.get_closest_marker("dashboard") and group_names == ['clients']:
         pytest.skip('Not a valid test for client node')
 
+    if request.node.get_closest_marker("no_rolling_update") and rolling_update:
+        pytest.skip('Not a valid test when testing rolling_update')
+
     data = dict(
         vars=ansible_vars,
         docker=docker,
index b3c92ebafb0416cc77e9fcd9cd92daaeea3beb81..0ec6ef210421ac314117bb498649afc3005be5de 100644 (file)
@@ -4,6 +4,7 @@ import pytest
 
 class TestNFSs(object):
 
+    @pytest.mark.no_rolling_update
     @pytest.mark.no_docker
     @pytest.mark.parametrize('pkg', [
         'nfs-ganesha',
@@ -23,6 +24,7 @@ class TestNFSs(object):
         assert host.file(
             "/etc/ganesha/ganesha.conf").contains("Entries_HWMark")
 
+    @pytest.mark.no_rolling_update
     def test_nfs_is_up(self, node, host, setup):
         hostname = node["vars"]["inventory_hostname"]
         cluster = setup['cluster_name']
index 7a739f0d1466eb946e1721bde453e51f30845517..19460c610f480e68e604421a317d9e5f5b109bb2 100644 (file)
@@ -48,6 +48,8 @@ commands=
   bash -c 'ANSIBLE_CONFIG={envdir}/tmp/ceph-ansible/ansible.cfg ansible-playbook -vv -i {envdir}/tmp/ceph-ansible/tests/functional/all_daemons{env:CONTAINER_DIR:}/hosts {envdir}/tmp/ceph-ansible/tests/functional/lvm_setup.yml --extra-vars "osd_scenario=lvm"'
 
   # deploy the cluster
+  # passing ceph_nfs_rgw_access_key and ceph_nfs_rgw_secret_key because of a weird behavior in the CI:
+  # When rendering the ganesha.conf.j2 template, it complains because of undefined variables in the block "{% if nfs_obj_gw | bool %}" although we explicitly set this variable to false (see below).
   bash -c 'ANSIBLE_CONFIG={envdir}/tmp/ceph-ansible/ansible.cfg 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 "\
       delegate_facts_host={env:DELEGATE_FACTS_HOST:True} \
       ceph_stable_release=octopus \
@@ -57,6 +59,10 @@ commands=
       ceph_docker_registry_auth=True \
       ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \
       ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \
+      nfs_file_gw=True \
+      nfs_obj_gw=False \
+      ceph_nfs_rgw_access_key=fake_access_key \
+      ceph_nfs_rgw_secret_key=fake_secret_key \
   "'
 
   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=pacific ceph_dev_sha1=latest setup_nfs_dev_repo=false" --tags "vagrant_setup"
@@ -66,6 +72,8 @@ commands=
       ceph_docker_registry_auth=True \
       ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \
       ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \
+      nfs_file_gw=True \
+      nfs_obj_gw=False \
   "
 
   bash -c "CEPH_STABLE_RELEASE=pacific 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"