puppet apply with pip provider gives 403 error

Bug #1593749 reported by Dr Philip J Naylor on 2016-06-17
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dbus (Ubuntu)

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


Requirement already up-to-date: rarfile in /usr/local/lib/python2.7/dist-packages
Cleaning up...

However, creating init.pp containing:

package { 'rarfile':
  ensure => 'latest',
  provider => 'pip',

and running:

puppet apply ./init.pp


Notice: Compiled catalog for narsaq.isys.bris.ac.uk in environment production in 0.01 seconds
Error: Could not get latest version: HTTP-Error: 403 Must access using HTTPS instead of HTTP
Error: /Stage[main]/Main/Package[rarfile]/ensure: change from 2.8 to latest failed: Could not get latest version: HTTP-Error: 403 Must access using HTTPS instead of HTTP
Notice: Finished catalog run in 1.05 seconds

This was previously working.

Brian Wong (bwong) wrote :

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:


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.

Cliff Roberts (watomlinson) wrote :

bwong's workaround also worked for me. See this Github PR -> https://github.com/puppetlabs/puppet/pull/5024

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers