Skip to content

Commit

Permalink
tests: use nfs + cephfs instead of rgw in update job
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
guits committed Jun 16, 2021
1 parent 9b57f33 commit 1bfedb8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions tests/functional/tests/nfs/test_nfs_ganesha.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

class TestNFSs(object):

@pytest.mark.no_rolling_update
@pytest.mark.no_docker
@pytest.mark.parametrize('pkg', [
'nfs-ganesha',
Expand All @@ -23,6 +24,7 @@ def test_nfs_config_override(self, node, host):
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']
Expand Down
8 changes: 8 additions & 0 deletions tox-update.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit 1bfedb8

Please sign in to comment.