HTTP response we received was '302 Found' when using "puppet module install"

Bug #1594316 reported by Dominic Cleal
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
puppet (Ubuntu)
Invalid
Undecided
Unassigned
Trusty
Invalid
Medium
Unassigned

Bug Description

The "puppet module" command is now throwing errors when installing modules from the Puppet Forge (https://forge.puppet.com), as it redirects from puppetlabs.com to puppet.com.

# puppet module install puppetlabs/ntp
Notice: Preparing to install into /etc/puppet/modules ...
Notice: Downloading from https://forge.puppetlabs.com ...
Error: Could not execute operation for 'puppetlabs/ntp'
  The server being queried was https://forge.puppetlabs.com
  The HTTP response we received was '302 Found'
    Check the author and module names are correct.

The command should install and unpack the module to /etc/puppet/modules/ntp, but instead fails.

As a workaround you can add "--module_repository https://forge.puppet.com/" to the command.

This affects Puppet 3.4.3 on Ubuntu 14.04 (trusty), and any version prior to 3.6.0 which uses the v1 API. Newer versions use the v3 API on forgeapi.puppetlabs.com instead and are unaffected.

The package should probably be patched to change module_repository to forge.puppet.com in lib/puppet/defaults.rb, or to use the v3 API (https://tickets.puppetlabs.com/browse/PUP-2093 and probably others).

# lsb_release -rd
Description: Ubuntu 14.04 LTS
Release: 14.04
# apt-cache policy puppet
puppet:
  Installed: 3.4.3-1ubuntu1.1
  Candidate: 3.4.3-1ubuntu1.1
  Version table:
 *** 3.4.3-1ubuntu1.1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     3.4.3-1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: puppet 3.4.3-1ubuntu1.1
ProcVersionSignature: Ubuntu 3.13.0-24.47-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
Date: Mon Jun 20 10:19:25 2016
PackageArchitecture: all
ProcEnviron:
 TERM=screen-256color
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: puppet
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Dominic Cleal (domcleal) wrote :
Revision history for this message
Dominic Cleal (domcleal) wrote :

I've also filed a ticket with Puppet to see if the server behaviour can be changed for the old API: https://tickets.puppetlabs.com/browse/FORGE-327

Dominic Cleal (domcleal)
summary: - HTTP response we received was '404 Not Found' when using "puppet module
+ HTTP response we received was '302 Found' when using "puppet module
install"
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in puppet (Ubuntu):
status: New → Confirmed
Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. I think this affects Trusty only - no other current Ubuntu releases? I'll mark the bug accordingly. If upstream commits a patch, we can certainly cherry-pick it. Since a workaround is available, I'll set the Importance to Medium.

Changed in puppet (Ubuntu Trusty):
status: New → Triaged
importance: Undecided → Medium
Changed in puppet (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Dominic Cleal (domcleal) wrote :

Yes, I think it only affects Trusty.

I think it's unlikely that upstream will provide a patch as upstream since 3.6.0 has moved to a newer API version that isn't affected by this issue. It does look likely from the FORGE-327 ticket above that the server behaviour will be changed for this older API version - if so, I'll update here so this ticket can be closed if it's resolved that way.

Revision history for this message
Robie Basak (racb) wrote :

Thanks. If upstream decline to provide a patch, I think someone else providing a patch would be fine. But I'd prefer to not diverge from upstream if possible, so would like to give them first refusal.

Revision history for this message
Dominic Cleal (domcleal) wrote :

This bug report can be rejected, the redirect has been removed on the server side so the existing code and clients using API v1 work again.

Revision history for this message
Robie Basak (racb) wrote :

Thank you for the update. If this changes again on the server size, please change the bug status back to New.

Changed in puppet (Ubuntu Trusty):
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.