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

requirements: update ansible requirements #7262

Merged
merged 1 commit into from
Aug 3, 2022

Conversation

ghost
Copy link

@ghost ghost commented Jul 28, 2022

Signed-off-by: Sven Kieske [email protected]

@ghost
Copy link
Author

ghost commented Jul 28, 2022

local testing indicates this is not enough to fix this.

I'm not deeply familiar with ansible modules but it seems it is not enough to install ansible.posix.

ansible still complains with the same error that it can't resolve module/action selinux_permissive

@dsavineau
Copy link
Contributor

the selinux_permissive module is part of the community.general ansible collection [1]

So you probably wants to have the same collection than the main branch [2]

[1] https://github.com/ansible-collections/community.general/blob/main/plugins/modules/system/selinux_permissive.py
[2] https://github.com/ceph/ceph-ansible/blob/main/requirements.yml#L9-L10

@ghost
Copy link
Author

ghost commented Jul 29, 2022

Thanks for the hint! I was mistaken by the module "selinux" inside ansible.posix, which does different things than selinux_permissive, it seems..

Signed-off-by: Sven Kieske <[email protected]>
@ghost ghost force-pushed the fix_requirements branch from 7afc776 to a2035dc Compare July 29, 2022 08:08
@guits guits changed the title fixes: https://github.com/ceph/ceph-ansible/issues/7261 requirements: update ansible requirements Jul 29, 2022
@guits guits changed the title requirements: update ansible requirements [skip ci] requirements: update ansible requirements Jul 29, 2022
@guits guits added the DNM Do NOT merge label Jul 29, 2022
@guits
Copy link
Collaborator

guits commented Jul 29, 2022

there's something unclear to me. I might be missing something but actually, I'm unsure what's the issue, @SvenMW

With ansible>=2.10,<2.11,!=2.9.10 we can see ansible-base 2.10.17 is pulled and seems to come with community.general and ansible.posix already (see the 'Skipping' messages at the end of this log).

[2347017] /home/jenkins-build/build/workspace/ceph-ansible-prs-centos-container-lvm_batch$ /tmp/venv.9CrzAIGvhS/centos-container-lvm_batch/bin/python -m pip freeze >../../../../../tmp/venv.9CrzAIGvhS/centos-container-lvm_batch/log/centos-container-lvm_batch-2.log
centos-container-lvm_batch installed: ansible==2.10.7,ansible-base==2.10.17,attrs==22.1.0,cffi==1.15.1,coverage==6.4.2,cryptography==37.0.4,execnet==1.9.0,iniconfig==1.1.1,Jinja2==3.1.2,jmespath==1.0.1,MarkupSafe==2.1.1,mock==4.0.3,netaddr==0.8.0,packaging==21.3,pluggy==1.0.0,py==1.11.0,pycparser==2.21,pyparsing==3.0.9,pytest==7.1.2,pytest-cov==3.0.0,pytest-forked==1.4.0,pytest-rerunfailures==10.2,pytest-testinfra==6.8.0,pytest-xdist==2.5.0,PyYAML==6.0,six==1.16.0,testinfra==6.0.0,tomli==2.0.1
centos-container-lvm_batch run-test-pre: PYTHONHASHSEED='591985680'
centos-container-lvm_batch run-test: commands[0] | ansible-galaxy install -r /home/jenkins-build/build/workspace/ceph-ansible-prs-centos-container-lvm_batch/requirements.yml -v
[2347018] /home/jenkins-build/build/workspace/ceph-ansible-prs-centos-container-lvm_batch/tests/functional/lvm-batch/container$ /tmp/venv.9CrzAIGvhS/centos-container-lvm_batch/bin/ansible-galaxy install -r /home/jenkins-build/build/workspace/ceph-ansible-prs-centos-container-lvm_batch/requirements.yml -v
Using /home/jenkins-build/build/workspace/ceph-ansible-prs-centos-container-lvm_batch/ansible.cfg as config file
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Skipping 'ansible.utils' as it is already installed
Skipping 'community.general' as it is already installed
Skipping 'ansible.posix' as it is already installed

@ghost
Copy link
Author

ghost commented Jul 29, 2022

mhm, in my case I'm manually installing pip install ansible-base==2.10

:edit: sorry I sent that too early.

Are you sure ansible-base pulls any galaxy modules in? I find that hard to believe and it's not what I see in a ubuntu focal:latest container:

cat Dockerfile 
From ubuntu:latest

Run apt update && \
    apt -y upgrade
Run apt -y install python3-pip
Run pip install ansible-base==2.10.17

build it with:

podman build .
[...]

check for ansible community general:

podman run --rm -it 82efc1142f8 bash
root@553d8d5097fe:/# ansible --version
ansible 2.10.17
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]
root@553d8d5097fe:/# ansible-galaxy collection install community.general
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Installing 'community.general:5.3.0' to '/root/.ansible/collections/ansible_collections/community/general'
Downloading https://galaxy.ansible.com/download/community-general-5.3.0.tar.gz to /root/.ansible/tmp/ansible-local-6v7h0ghbe/tmpz8zlj1gf
community.general (5.3.0) was installed successfully

So I guess ansible-base is not enough and something else pulls in community.general, something not in the requirements.yml, as I installed it and still was greeted with the error in the linked issue.

@guits
Copy link
Collaborator

guits commented Jul 29, 2022

I think what we see in the CI is misleading because collections aren't installed in isolated environments. Once a collection is installed then it's available for any new job.

@guits
Copy link
Collaborator

guits commented Jul 29, 2022

I think we need something like this #7264

@ghost
Copy link
Author

ghost commented Aug 1, 2022

I think we need something like this #7264

while this seems reasonable - I don't know much about the ceph CI - this linked PR does not address the issue of an incomplete requirements.yml file as afaik proven by me in my previous comment which is needed for real world deployments which do not get installed via tox, like the ceph ci, or custom CIs like mine.

@guits
Copy link
Collaborator

guits commented Aug 2, 2022

I think we need something like this #7264

this linked PR does not address the issue of an incomplete requirements.yml file as afaik proven by me in my previous comment

This linked PR has never been intended for fixing the initial issue you reported.

@guits
Copy link
Collaborator

guits commented Aug 2, 2022

@SvenMW can you rebase onto stable-6.0? thanks!

@guits guits removed the DNM Do NOT merge label Aug 2, 2022
@guits guits changed the title [skip ci] requirements: update ansible requirements requirements: update ansible requirements Aug 2, 2022
@guits
Copy link
Collaborator

guits commented Aug 3, 2022

jenkins test centos-container-lvm_batch

@guits
Copy link
Collaborator

guits commented Aug 3, 2022

the errors seen are unrelated. I've tested manually, so I'm merging this as it is.

@guits guits merged commit 99344e6 into ceph:stable-6.0 Aug 3, 2022
@ghost ghost deleted the fix_requirements branch August 3, 2022 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants