Project

General

Profile

Bug #6429

Run Puppet causes Error 500 with message "Warning! undefined method `gsub' for #<Array:0x000000091b0608>"

Added by Paolo Larcheri about 8 years ago. Updated about 8 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Puppet integration
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

In order to have the puppetrun features enabled I configured Foreman and the puppet clients as documented here:
http://projects.theforeman.org/projects/foreman/wiki/Puppetrun

When I click on "Run Puppet" I get exactly what reported in the Subject.

In production.log I found these:

Started GET "/hosts/eca86bf602f9/puppetrun" for 10.10.0.2 at 2014-06-28 23:47:31 +0200
Processing by HostsController#puppetrun as HTML
Parameters: {"id"=>"eca86bf602f9"}
Operation FAILED: undefined method `gsub' for #<Array:0x000000091b0608>
Rendered common/500.html.erb within layouts/application (3.7ms)
Rendered layouts/base.html.erb (1.7ms)
Completed 500 Internal Server Error in 2323.9ms (Views: 7.2ms | ActiveRecord: 0.6ms)

On the client not traffic is received on the port TCP/8139.
Let me know if you need more info.
Paolo Larcheri


Related issues

Is duplicate of Foreman - Bug #6402: Using "run puppet" feature fails: undefined method `gsub' for #<Array ...>Closed2014-06-26

History

#1 Updated by Ohad Levy about 8 years ago

do you happen to get a full trace in the UI?

#2 Updated by Paolo Larcheri about 8 years ago

No full trace.

I found out this:

root@server:/var/lib/puppet/ssl/ca/signed# cat /var/log/foreman-proxy/foreman-proxy.log
W, [2014-06-29T21:59:35.787348 #9917] WARN -- : Non-null exit code when executing '["/usr/bin/sudo", "/usr/sbin/puppetrun", "--host", "eca86bf602f9.blabla"]'
E, [2014-06-29T21:59:35.829982 #9917] ERROR -- : Failed puppet run: Check Log files
W, [2014-06-29T22:02:27.153217 #9917] WARN -- : Non-null exit code when executing '["/usr/bin/sudo", "/usr/sbin/puppetrun", "--host", "eca86bf602f9.blabla"]'
E, [2014-06-29T22:02:27.153830 #9917] ERROR -- : Failed puppet run: Check Log files

So I run the command from a shell and I got a "forbidden" from the client.
It turned out the servername specified in the client auth.conf was wrong.

Anyway, a more meaningful message in the UI would be a good thing :-)

Thanks for the time
PL

#3 Updated by Dominic Cleal about 8 years ago

  • Is duplicate of Bug #6402: Using "run puppet" feature fails: undefined method `gsub' for #<Array ...> added

#4 Updated by Dominic Cleal about 8 years ago

  • Status changed from New to Duplicate

Thanks, we're tracking this in #6402.

Also available in: Atom PDF