Bug #1507

Documnetation / integration with puppet / webrick stuff

Added by Frederik Nosi over 5 years ago. Updated almost 5 years ago.

Status:Closed
Priority:Low
Assigned To:-
Category:-
Target version:Foreman - Bug scrub
Difficulty:hard Bugzilla link:
Found in release: Pull request:
Story points-
Velocity based estimate-

Description

Trying to integrate foreman with puppet, using webrick, i hit an issue very similar to this one: http://theforeman.org/issues/229
But even adding a default node in puppet's configuration i got the same problem, eg:

root@leith:/etc/puppet# puppet agent --test --server leith.fre.local --noop
notice: Ignoring --listen on onetime run
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find node 'leith.fre.local'; cannot compile
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

turns out, the node.rb generated from the installer foreman's puppet class (using ubuntu's packages but same stuff with RH repos, epel and foremans), has this setting:

[...]
SETTINGS = {
:url => "http://leith.fre.local:3000*/*",
[...]

Which actually is right, but when the ECN script connects to foreman to ask for node's yaml, the actual HTTP get request is:

GET http://leith.fre.local:3000//node/leith.fre.local?format=yml HTTP/1.1
Accept: */*
Host: leith.fre.local:3000

which results in webrick replying with 404 - node not found.

Just taking out the last '/' in the ecn script:

[...]
SETTINGS = {
:url => "http://leith.fre.local:3000",
[...]

solves the issue.

IMHO, this seems like a webrick issue, though not sure if double / are allowed by the HTTP specifications. Posted this to save time to other poor souls who may hit the same issue, so please add this on the documentation.

Thanks,
Frederik

History

#1 Updated by Ohad Levy almost 5 years ago

  • Status changed from New to Closed
  • Target version set to Bug scrub

docs updated

Also available in: Atom PDF