Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: isolate ansible collections #7264

Merged
merged 2 commits into from
Aug 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions infrastructure-playbooks/rolling_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -851,12 +851,18 @@
become: True
gather_facts: false
tasks:
- name: check for ceph rbd mirror services
command: systemctl show --no-pager --property=Id --state=enabled ceph-rbd-mirror@* # noqa 303
changed_when: false
register: rbdmirror_services

- name: stop ceph rbd mirror
systemd:
name: "ceph-rbd-mirror@rbd-mirror.{{ ansible_facts['hostname'] }}"
service:
name: "{{ item.split('=')[1] }}"
state: stopped
enabled: no
masked: yes
loop: "{{ rbdmirror_services.stdout_lines }}"

- import_role:
name: ceph-defaults
Expand Down
4 changes: 3 additions & 1 deletion tox-cephadm.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ passenv=*
sitepackages=True
setenv=
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
ANSIBLE_COLLECTIONS_PATH = {envdir}/ansible_collections
ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
ANSIBLE_CALLBACK_WHITELIST = profile_tasks
ANSIBLE_CALLBACK_ENABLED = profile_tasks
ANSIBLE_KEEP_REMOTE_FILES = 1
ANSIBLE_CACHE_PLUGIN = memory
ANSIBLE_GATHERING = implicit
Expand All @@ -27,6 +28,7 @@ deps= -r{toxinidir}/tests/requirements.txt
changedir= {toxinidir}/tests/functional/cephadm

commands=
ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections
bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}

Expand Down
4 changes: 3 additions & 1 deletion tox-docker2podman.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ passenv=*
sitepackages=True
setenv=
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
ANSIBLE_COLLECTIONS_PATH = {envdir}/ansible_collections
ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
ANSIBLE_CALLBACK_WHITELIST = profile_tasks
ANSIBLE_CALLBACK_ENABLED = profile_tasks
ANSIBLE_KEEP_REMOTE_FILES = 1
ANSIBLE_CACHE_PLUGIN = memory
ANSIBLE_GATHERING = implicit
Expand All @@ -27,6 +28,7 @@ deps= -r{toxinidir}/tests/requirements.txt
changedir= {toxinidir}/tests/functional/docker2podman

commands=
ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections
bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}

Expand Down
5 changes: 3 additions & 2 deletions tox-external_clients.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ allowlist_externals =
passenv=*
setenv=
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
ANSIBLE_COLLECTIONS_PATH = {envdir}/ansible_collections
ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
ANSIBLE_CALLBACK_WHITELIST = profile_tasks
ANSIBLE_CALLBACK_ENABLED = profile_tasks
ANSIBLE_CACHE_PLUGIN = memory
ANSIBLE_GATHERING = implicit
# only available for ansible >= 2.5
Expand All @@ -30,7 +31,7 @@ setenv=
deps= -r{toxinidir}/tests/requirements.txt
changedir={toxinidir}/tests/functional/external_clients{env:CONTAINER_DIR:}
commands=
ansible-galaxy install -r {toxinidir}/requirements.yml -v
ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections
bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}

Expand Down
4 changes: 3 additions & 1 deletion tox-filestore_to_bluestore.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ allowlist_externals =
passenv=*
setenv=
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
ANSIBLE_COLLECTIONS_PATH = {envdir}/ansible_collections
ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
ANSIBLE_CALLBACK_WHITELIST = profile_tasks
ANSIBLE_CALLBACK_ENABLED = profile_tasks
ANSIBLE_CACHE_PLUGIN = memory
ANSIBLE_GATHERING = implicit
# only available for ansible >= 2.5
Expand All @@ -35,6 +36,7 @@ setenv=
deps= -r{toxinidir}/tests/requirements.txt
changedir={toxinidir}/tests/functional/filestore-to-bluestore{env:CONTAINER_DIR:}
commands=
ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections
bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}

Expand Down
4 changes: 3 additions & 1 deletion tox-podman.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ passenv=*
sitepackages=True
setenv=
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
ANSIBLE_COLLECTIONS_PATH = {envdir}/ansible_collections
ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
ANSIBLE_CALLBACK_WHITELIST = profile_tasks
ANSIBLE_CALLBACK_ENABLED = profile_tasks
ANSIBLE_KEEP_REMOTE_FILES = 1
ANSIBLE_CACHE_PLUGIN = memory
ANSIBLE_GATHERING = implicit
Expand All @@ -31,6 +32,7 @@ deps= -r{toxinidir}/tests/requirements.txt
changedir= {toxinidir}/tests/functional/podman

commands=
ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections
bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}

Expand Down
4 changes: 3 additions & 1 deletion tox-shrink_osd.ini
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ passenv=*
sitepackages=False
setenv=
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
ANSIBLE_COLLECTIONS_PATH = {envdir}/ansible_collections
ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
ANSIBLE_CALLBACK_WHITELIST = profile_tasks
ANSIBLE_CALLBACK_ENABLED = profile_tasks
ANSIBLE_KEEP_REMOTE_FILES = 1
ANSIBLE_CACHE_PLUGIN = memory
ANSIBLE_GATHERING = implicit
Expand All @@ -80,6 +81,7 @@ changedir=


commands=
ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections
ansible-playbook -vv -i "localhost," -c local {toxinidir}/tests/functional/dev_setup.yml --extra-vars "dev_setup={env:DEV_SETUP:False} change_dir={changedir} ceph_dev_branch={env:CEPH_DEV_BRANCH:main} ceph_dev_sha1={env:CEPH_DEV_SHA1:latest}" --tags "vagrant_setup"

bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}
Expand Down
5 changes: 3 additions & 2 deletions tox-subset_update.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ allowlist_externals =
passenv=*
setenv=
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
ANSIBLE_COLLECTIONS_PATH = {envdir}/ansible_collections
ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
ANSIBLE_CALLBACK_WHITELIST = profile_tasks
ANSIBLE_CALLBACK_ENABLED = profile_tasks
ANSIBLE_CACHE_PLUGIN = memory
ANSIBLE_GATHERING = implicit
# only available for ansible >= 2.5
Expand All @@ -35,7 +36,7 @@ setenv=
deps= -r{toxinidir}/tests/requirements.txt
changedir={toxinidir}/tests/functional/subset_update{env:CONTAINER_DIR:}
commands=
ansible-galaxy install -r {toxinidir}/requirements.yml -v
ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections
bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}

Expand Down
7 changes: 5 additions & 2 deletions tox-update.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ allowlist_externals =
passenv=*
setenv=
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
ANSIBLE_COLLECTIONS_PATH = {envdir}/ansible_collections
ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
ANSIBLE_CALLBACK_WHITELIST = profile_tasks
ANSIBLE_CALLBACK_ENABLED = profile_tasks
ANSIBLE_CACHE_PLUGIN = memory
ANSIBLE_GATHERING = implicit
# only available for ansible >= 2.5
Expand All @@ -38,6 +39,8 @@ commands=
bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}

ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections

ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/setup.yml

# # use the stable-7.0 branch to deploy an octopus cluster
Expand All @@ -63,7 +66,7 @@ commands=

# pip uninstall -y ansible
# pip install -r {toxinidir}/tests/requirements.txt
ansible-galaxy install -r {toxinidir}/requirements.yml -v
# ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections

ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/infrastructure-playbooks/rolling_update.yml --extra-vars "\
ireallymeanit=yes \
Expand Down
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,11 @@ sitepackages=False
setenv=
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
ANSIBLE_CALLBACK_WHITELIST = profile_tasks
ANSIBLE_CALLBACKS_ENABLED = profile_tasks
ANSIBLE_KEEP_REMOTE_FILES = 1
ANSIBLE_CACHE_PLUGIN = memory
ANSIBLE_GATHERING = implicit
ANSIBLE_COLLECTIONS_PATH = {envdir}/ansible_collections
# only available for ansible >= 2.5
ANSIBLE_STDOUT_CALLBACK = yaml
non_container: DEV_SETUP = True
Expand Down Expand Up @@ -360,7 +361,7 @@ changedir=
cephadm_adopt: {toxinidir}/tests/functional/all_daemons{env:CONTAINER_DIR:}

commands=
ansible-galaxy install -r {toxinidir}/requirements.yml -v
ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections
rhcs: ansible-playbook -vv -i "localhost," -c local {toxinidir}/tests/functional/rhcs_setup.yml --extra-vars "change_dir={changedir}" --tags "vagrant_setup"
non_container: ansible-playbook -vv -i "localhost," -c local {toxinidir}/tests/functional/dev_setup.yml --extra-vars "dev_setup={env:DEV_SETUP:False} change_dir={changedir} ceph_dev_branch={env:CEPH_DEV_BRANCH:main} ceph_dev_sha1={env:CEPH_DEV_SHA1:latest}" --tags "vagrant_setup"

Expand Down