Bug #1507
closedDocumnetation / integration with puppet / webrick stuff
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
Updated by Ohad Levy over 12 years ago
- Status changed from New to Closed
- Target version set to Bug scrub
docs updated
Updated by Ewoud Kohl van Wijngaarden about 6 years ago
- Description updated (diff)
- Target version deleted (
571) - Triaged set to No