From 63983fa0b728571518ecdeca249ef37506a00a64 Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Wed, 12 Apr 2017 07:50:41 -0500 Subject: [PATCH 1/4] tests: remove CEPH_STABLE environment variable I'm removing this because when we use an 'rhcs' scenario then we attempt to set CEPH_STABLE=false as an environment variable. The issue with that is because the value is coming from an environment variable it is always treated as a string and ansible treats that as a boolean True. I plan to set the ceph_stable value with our rhcs_setup.yml playbook instead of relying on ---extra-vars and environment variables. Related ansible issue: https://github.com/ansible/ansible/issues/17193 Signed-off-by: Andrew Schoen --- tox.ini | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tox.ini b/tox.ini index 7ac24e1f7..09a414a39 100644 --- a/tox.ini +++ b/tox.ini @@ -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 '\ @@ -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 @@ -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 @@ -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 @@ -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}"\ From 386afbec83b72dcc3a552682d4376d1bf6a99417 Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Wed, 12 Apr 2017 07:53:49 -0500 Subject: [PATCH 2/4] tests: set needed config in group_vars/all for rhcs testing Instead of relying on environment variables and --extra-vars simply modify the group_vars/all that ships with the specific testing scenario to enable ceph_rchs testing. Signed-off-by: Andrew Schoen --- tests/functional/rhcs_setup.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/functional/rhcs_setup.yml b/tests/functional/rhcs_setup.yml index 7dadcf971..369a4905d 100644 --- a/tests/functional/rhcs_setup.yml +++ b/tests/functional/rhcs_setup.yml @@ -27,6 +27,25 @@ 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 + - hosts: all gather_facts: true become: yes From 37d38b122bde02efc1bde0d61ceeee3999ebb7ff Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Wed, 12 Apr 2017 07:55:03 -0500 Subject: [PATCH 3/4] ceph-common: is ceph_rchs is True do not include install_on_redhat.yml That task includes logic for upstream installs that we do not want to run when deploying RHCS. Signed-off-by: Andrew Schoen --- roles/ceph-common/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/ceph-common/tasks/main.yml b/roles/ceph-common/tasks/main.yml index 360c21232..ca25812f7 100644 --- a/roles/ceph-common/tasks/main.yml +++ b/roles/ceph-common/tasks/main.yml @@ -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) From 0e6d89b9db1b4677db42bf04c88547ebc00e1194 Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Wed, 12 Apr 2017 09:23:21 -0500 Subject: [PATCH 4/4] tests: print contents of group_vars/all after modification This is just nice to see in the test output so we know exactly what configuration is going to be used. Signed-off-by: Andrew Schoen --- tests/functional/rhcs_setup.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/functional/rhcs_setup.yml b/tests/functional/rhcs_setup.yml index 369a4905d..286d8e5ae 100644 --- a/tests/functional/rhcs_setup.yml +++ b/tests/functional/rhcs_setup.yml @@ -46,6 +46,9 @@ 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