Open compscidr opened 2 years ago
Hi,
Thanks. You mentioned it worked pretty well on 22.04, did it work out of the box with no adjustments on the fresh install?
I'm kind of surprised upgrading would cause that issue or if it's worth trying to find a workaround especially with Docker now installing Docker Compose through its official apt plugin which no longer requires a Python runtime or a virtualenv to be created. Your workaround seems good for the 1 off case. Did this happen every time you upgraded, just once out of X times or only once in the one time you tried it?
I think from a fresh install it works fine, I'll double check and report back.
Also, have a couple other machines that also need to be upgraded, will do those this evening and again let you know.
Confirmed on another machine I upgraded that the same issue is occurring, also confirmed that a fresh install works fine.
Thanks. I wonder why it's picky about not being able to keep that file between upgrades. I am seeing in 22.04 it does work out of the box. Upgrading from 20.04 is kind of edge case'ish but if we can do something easily to address it I'm ok with supporting it. Any suggestions?
Sorry, got busy for a few weeks there.
Perhaps we could have a handler for the failure case which clobbers that folder or something? I'm not sure if there's a case though where we wouldn't want it to do that. I can give it a try and make a PR when I get a chance.
For me, the problem that it used some virtualenv python to install pip docker (instead of the regular ansible python) happened with a fresh Ubuntu 22.04 using Ansible 6.3.0
https://github.com/nickjj/ansible-docker#configuring-virtualenv explains why a virtualenv is used for anything that gets pip installed, that's the intended behavior.
I also experienced the same issue after upgrading to Ubuntu 22.04`- the removing of the virtualenv fixed the issue.
Seems like this issue is also present after upgrade from 22.04 -> 24.04, removing the venv still fixes the issue though.
Kind of an edge case, so feel free to close.
I've been using this with ubuntu 22.04 on some other machines on fresh installs and it seems to work pretty well (even though I know its not listed as supported).
I have another machine which I did an upgrade from 20.04, and when it ran the
Install Python packages
it fails (it seems because it still had the old virtualenv there.This was the sort error I saw:
Fixed it by just clobbering the virtualenv with
sudo rm -rf /usr/local/lib/docker/virtualenv
and now everything is happy.Just thought I'd let you know in case you have any ideas on detecting and deadling with this edge case. Also appreciate this project!