Project

General

Profile

Actions

Bug #1507

closed

Documnetation / integration with puppet / webrick stuff

Added by Frederik Nosi about 12 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Difficulty:
hard
Triaged:
No
Fixed in Releases:
Found in Releases:

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

Actions #1

Updated by Ohad Levy over 11 years ago

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

docs updated

Actions #2

Updated by Ewoud Kohl van Wijngaarden about 5 years ago

  • Description updated (diff)
  • Target version deleted (571)
  • Triaged set to No
Actions

Also available in: Atom PDF