puppet apply with pip provider gives 403 error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
puppet (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Since some time on 16/06/2016 Puppet manifests that use the "pip" provider to manage Python packages are failing with a 403 error, on (at least) Ubuntu 14.04.4 LTS, when processed using "puppet apply...".
puppet version is 3.4.3-1ubuntu1.1
python-pip version is 1.5.4-1ubuntu3
python version is 2.7.5-5ubuntu3
On the command line:
pip install --upgrade rarfile
returns:
Requirement already up-to-date: rarfile in /usr/local/
Cleaning up...
However, creating init.pp containing:
package { 'rarfile':
ensure => 'latest',
provider => 'pip',
}
and running:
puppet apply ./init.pp
returns:
Notice: Compiled catalog for narsaq.
Error: Could not get latest version: HTTP-Error: 403 Must access using HTTPS instead of HTTP
Error: /Stage[
Notice: Finished catalog run in 1.05 seconds
This was previously working.
affects: | dbus (Ubuntu) → puppet (Ubuntu) |
My colleagues ran into this issue yesterday and I think we tracked it down to a hardcoded method of retrieving the 'latest' for a pip package on old versions of the puppet agent. See this commit and line number at:
https:/ /github. com/puppetlabs/ puppet/ commit/ 152299cc859fc74 343c69784184808 6d4e41b6f8# diff-41bbce95c8 2bdc373da03bb2f 6116ef5L70
What we ended up doing was hardcoding the version of the pip packages in our package resource declarations that used the pip provider. We did this as a short-term workaround until we can upgrade Puppet to a newer version that did not have this hardcoded mechanism.