-
Notifications
You must be signed in to change notification settings - Fork 18
Allow pip packages to be optionally installed into a virtualenv #127
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
Conversation
|
@mnaser i've got CI that exercises this here https://review.opendev.org/c/openstack/openstack-ansible-os_magnum/+/923174 and its working on a debian-12 system proving out the pep668 stuff. For all the openstack-ansible jobs i've now defaulted to using a venv on the kubernetes target hosts for all distributions and it looks OK. Interested to know if you're happy with all these new vars in defaults/main.yml, or if we should hide some of them away in vars/main.yml to keep the surface area of the role defaults smaller. |
52cb3a0 to
4109d45
Compare
a9010cf to
0cd09b4
Compare
|
Can somebody re-run the job? As failure there is obviously intermittent and unrelated, as it failed to fetch available k8s versions. Or maybe @jrosser you can rebase on top of main to trigger it? |
Done. |
ac802f6 to
0f058db
Compare
|
@mnaser is there any chance to get this patch in? as in OSA we pretty much relying on venvs, so not having ability to use them is pretty much a blocker for moving on. |
|
@noonedeadpunk inthink mostly what would be nice is CI for this and we have noble nodes available for use to be able to test it.. |
|
Ok, I will try to take a look at way of testing this. So far - we perform test of this branch in our ops repo: |
|
I think that the main issue is that the existing CI for this is using tox which creates it's own venv, and for that reason any |
|
also, another rebase would be helpful for me at least - just yesterday I tried to run control cluster at 1.30 and made a very loud "doh" as that would need both this PR and !137 |
pep-668 will force installation of python modules with pip into a virtualenv rather than the system python. This is already required for debian-12 and ubuntu-24.04. This patch allows the caller of ansible-collection-kubernetes to pass the path to a pre-created virtualenv to install python target host requirements for ansible modules into.
|
@noonedeadpunk this is rebased again now |
|
So this is something that we can finally approach properly and see the errors/failures because we have actual an actual remote connection, so this means this issue actually shows up, rather than Ansible using the same as the virtual env we use to run it on the same host (since we used connection = local). I am not a fan of this approach, due to the fact that it means that using the The approach I'm looking into is packaging the Python SDK for Kubernetes which should resolve this issue (for now). |
|
#191 should be the best way forward that maintains everything to continue working, and we use the modules and they're clearly just working fine. |
|
solved by #191 |
pep-668 will force installation of python modules with pip into a virtualenv rather than the system python. This is already required for deban-12 and ubuntu-24.04.
This patch allows the caller of ansible-collection-kubernetes to pass the path to a pre-created virtualenv to install python target host requirements for ansible modules into.