-
Notifications
You must be signed in to change notification settings - Fork 109
python_runtime does not install pip on CentOS/RHEL 7 #35
Comments
This also causes trying to install packages with the
|
What versions of |
|
If you run with |
Encountering the exact same issue. This is a blocker. Happens on Amazon Linux. |
@eric-tucker Same question, what debugging output do you see? |
A lot. You're going to have to be more specific in what you're looking for. |
I'll try to assemble the debug output today (haven't had time yet) |
As mentioned above, look for output related to the |
|
That's all output after the first hit to poise-python::default. |
Okay, so here is the problem: The bootstrap script thinks pip is already installed. Above that you can see it downloading the bootstrap script |
@coderanger in my environment, the only place in the debug out put that
|
Amazon Linux uses EPEL 6. I have had to do some hackin to get Amazon Linux to stop being stupid with regards to pip versions. As a result I've been uninstalling the yum packages python26-pip and python27-pip and trying to let your cookbook install. The server I'm working on apparently got into some state where those packages got reinstalled, then uninstalled, then the binaries were removed yet the dist-packages weren't removed. |
@gene1wood If you want to post the whole thing after @eric-tucker I don't actually test on Amazon Linux so I'm happy to take patches but I don't have much first-hand experience. I added the package names based on the published lists of packages for the latest version. |
@eric-tucker Also it's odd that the bootstrap script would see pip but it wouldn't actually be available. I don't use the binaries in favor of |
I'm not sure - Amazon Linux is a clusterf**k with regards to Python setup. I've managed to work around the issue by manually removing the dist-packages for pip then letting your cookbook reinstall (at which point get-pip.py succeeded). |
@coderanger ok, I've simplified this a whole bunch and got the output. I created a brand new cookbook. I added a "depends 'poise-python'" to The output is here : https://gist.github.com/gene1wood/a7f4fb4555f8d25a4db1 |
@gene1wood That doesn't actually show the debug output from the Chef run, it's the output from chef zero. |
@coderanger good point. I'll do some googling to see if I can figure out how to make chef-client show debug output. |
@gene1wood Just using |
Ok, here's what's going on. I think that poise-python assumes that the user will be running either the If I add Problem is, Centos 7 comes with python 2.7 natively and I have no need to use SCL or create a software collection. Is there any way for the |
@gene1wood Yes you need to get a python_runtime '2.7' do
provider :system
end (or set it via node attributes, Sounds like we have two unrelated bugs here. One is that the pip install is broken on Amazon Linux and the other was not having a |
Yes, I think the Amazon Linux issue is probably best moved to a new issue (based on the title of this issue). Ok, I'll probably just continue with a Thanks for your help on this coderanger. |
I mean the error seems pretty clear to me, pip wasn't installed because you weren't installing it. I set things up to allow not using |
Neither case explains @tduzan's original report though, so still need to figure that one out :) |
Oh actually on closer reading, that is because of the SCL issue too, on CentOS 7 the pip binary would end up in |
Sounds good. Thanks! |
I can confirm that adding Either way, I had refactored the cookbook using this to use poise/python instead and that worked fine for my needs. I'll consider refactoring back at some point in the near future. Thanks. |
@tduzan It probably wasn't failing, you were likely just later on using the wrong python binary/environment. |
That's unlikely. The item being installed via pip was a service that installs to /usr/bin/, it was not present despite the python_package not reporting a failure. |
Test-case recipe only has the following inside
Berksfile
metadata.rb
recipes/default.rb
Logging in after a "kitchen converge" results in the following
This causes a subsequent python_package call to fail, but it is a silent failure which results in the recipe continuing and failing at a later point in time because the expected python tool was never installed so its command was unavailable.
Let me know if there's any additional info you need from me to help replicate this issue to resolve it. Thanks.
The text was updated successfully, but these errors were encountered: