Skip to content

Commit

Permalink
Merge pull request #1450 from ceph/backport-1439
Browse files Browse the repository at this point in the history
Backport: 'tests: fix ceph_rhcs setup #1439'
  • Loading branch information
andrewschoen authored Apr 17, 2017
2 parents 85da786 + 9d2ed07 commit 4c32f96
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 7 deletions.
4 changes: 2 additions & 2 deletions roles/ceph-common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@

- include: ./installs/install_on_redhat.yml
when:
ansible_os_family == 'RedHat' and
not ceph_rhcs_iso_install
- ansible_os_family == 'RedHat'
- not ceph_rhcs
tags:
- package-install
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
Expand Down
29 changes: 29 additions & 0 deletions tests/functional/rhcs_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,35 @@
dest: "{{ change_dir }}/vagrant_variables.yml"
when: change_dir is defined

- name: change centos/atomic-host vagrant box name to rhel7
replace:
regexp: "centos/atomic-host"
replace: "rhel7"
dest: "{{ change_dir }}/vagrant_variables.yml"
when: change_dir is defined

- name: change ceph_stable to False
replace:
regexp: "ceph_stable:.*"
replace: "ceph_stable: False"
dest: "{{ change_dir }}/group_vars/all"
when: change_dir is defined

- name: set ceph_rhcs to True
lineinfile:
line: "ceph_rhcs: True"
dest: "{{ change_dir }}/group_vars/all"
when: change_dir is defined

- name: set ceph_origin to distro
lineinfile:
line: "ceph_origin: distro"
dest: "{{ change_dir }}/group_vars/all"
when: change_dir is defined

- name: print contents of {{ change_dir }}/group_vars/all
command: "cat {{ change_dir }}/group_vars/all"

- hosts: all
gather_facts: true
become: yes
Expand Down
5 changes: 0 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ commands=
"ceph_dev_branch":"{env:CEPH_DEV_BRANCH:master}",\
"ceph_dev_sha1":"{env:CEPH_DEV_SHA1:latest}",\
"ceph_stable_release":"{env:CEPH_STABLE_RELEASE:jewel}",\
"ceph_stable":{env:CEPH_STABLE:true}\
\}'
# set up the cluster again
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/site.yml.sample --extra-vars '\
Expand All @@ -30,7 +29,6 @@ commands=
"ceph_dev_branch":"{env:CEPH_DEV_BRANCH:master}",\
"ceph_dev_sha1":"{env:CEPH_DEV_SHA1:latest}",\
"ceph_stable_release":"{env:CEPH_STABLE_RELEASE:jewel}",\
"ceph_stable":{env:CEPH_STABLE:true}\
\}'
# test that the cluster can be redeployed in a healthy state
testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {toxinidir}/tests/functional/tests
Expand All @@ -50,7 +48,6 @@ commands=
"ceph_dev_branch":"{env:UPDATE_CEPH_DEV_BRANCH:master}",\
"ceph_dev_sha1":"{env:UPDATE_CEPH_DEV_SHA1:latest}",\
"ceph_stable_release":"{env:UPDATE_CEPH_STABLE_RELEASE:kraken}",\
"ceph_stable":{env:CEPH_STABLE:true}\
\}'

testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {toxinidir}/tests/functional/tests
Expand All @@ -71,7 +68,6 @@ setenv=
docker_dedicated_journal: PLAYBOOK = site-docker.yml.sample
docker_dmcrypt_journal_collocation: PLAYBOOK = site-docker.yml.sample
rhcs: CEPH_RHCS = true
rhcs: CEPH_STABLE = false
jewel: CEPH_STABLE_RELEASE = jewel
kraken: CEPH_STABLE_RELEASE = kraken
kraken: UPDATE_CEPH_STABLE_RELEASE = luminous
Expand Down Expand Up @@ -118,7 +114,6 @@ commands=
"ceph_dev_branch":"{env:CEPH_DEV_BRANCH:master}",\
"ceph_dev_sha1":"{env:CEPH_DEV_SHA1:latest}",\
"ceph_stable_release":"{env:CEPH_STABLE_RELEASE:jewel}",\
"ceph_stable":{env:CEPH_STABLE:true},\
"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}"\
Expand Down

0 comments on commit 4c32f96

Please sign in to comment.