kindredgroup / puppet-forge-server

Private Puppet forge server supports local files and both v1 and v3 API proxies
69 stars 44 forks source link

Unable to proxy/cache certain modules (CAPS?) #23

Closed cmoore-cimpress closed 9 years ago

cmoore-cimpress commented 9 years ago

I have puppet-forge-server working well for a variety of both public and private modules.

I noticed that, when attempting to pull the AlexCline-fstab module through puppet-forge-server, I get:

Error: Request to Puppet Forge failed.
  The server being queried was /v3/files/v3/files/AlexCline-fstab-0.5.4.tar.gz
  The HTTP response we received was '404 Not Found'

I'm using librarian-puppet 2.2.0, puppet 3.7.5, and the entry in my puppetfile is:

mod "AlexCline-fstab"

I also tried all lowercase (alexcline-fstab), and I get a different error:

Error requesting http://myforge/api/v1/releases.json?module=alexcline/fstab: 400 Bad Request
i11 commented 9 years ago

Hey,

Thanks for letting me know. Unfortunately I wasn't able to reproduce it. What's your setup (OS, ruby versions etc.)? What server version do you run?

cmoore-cimpress commented 9 years ago

Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-49-generic x86_64) ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux] rubygems 1.8.23

I'm using puppet-forge-server via git (not the gem), ref e0bfec3bbbf3b8759985b5b22db02421ab5e390b

I'm launching puppet-forge-server via this command: bundle exec bin/puppet-forge-server --port 8080 --bind 0.0.0.0 --module-dir /opt/forge/modules --proxy=https://forgeapi.puppetlabs.com/ --cache-basedir /opt/forge/proxycache --daemonize --pidfile /opt/forge/forge.pid --log-dir /opt/forge/log

i11 commented 9 years ago

Got it! It feels like both this issue and https://github.com/unibet/puppet-forge-server/pull/24 is referring to the same problem with first capital letters in the module name. Thanks a lot for raising the issue!

i11 commented 9 years ago

https://github.com/unibet/puppet-forge-server/commit/759504ba7ab95f0931079a5e7594e1e3c3eb13cd should do the trick. Please let me know if it works for you.

i11 commented 9 years ago

1.7.1 released. Closing..

cmoore-cimpress commented 9 years ago

I meant to reply earlier. I confirmed that the ref above fixes the issue. Thanks