Project

General

Profile

Actions

Support #7964

closed

unable to import puppet class

Added by Suyash Jain over 9 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Puppet
Target version:
-
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hi,

I have puppet master and forman on saparate servers , i have added puppet master through smart proxy and now when i am trying to import classes from my production nvironment, i am getting the following error.

Oops, we're sorry but something went wrong

Warning!
undefined method `values' for []:Array

If you feel this is an error with Foreman itself, please open a new issue with Foreman ticketing system, You would probably need to attach the Full trace and relevant log entries.
NoMethodError
undefined method `values' for []:Array
app/services/puppet_class_importer.rb:78:in `new_classes_for'
app/services/puppet_class_importer.rb:39:in `changes'
app/controllers/concerns/foreman/controller/environments.rb:11:in `import_environments'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'

Actions #1

Updated by Suyash Jain over 9 years ago

i an not able to import puppet envirment also.

the same error

Warning!
undefined method `values' for []:Array

Actions #2

Updated by Anonymous over 9 years ago

  • Tracker changed from Bug to Support
  • Priority changed from Urgent to Normal

Hello,
please have a look into the logfiles of the smart proxy on the Puppet master (/var/log/foreman-proxy/proxy.log). Any pointer, why no environments are found?

Actions #3

Updated by Justin Sherrill about 9 years ago

Note, i saw this recently and the cause was that the smart proxy was returning a 404 because the puppet master was not configured to use environments. No idea if this was your cause, but my guess is that foreman is not handling most error states 404,500, etc..

Actions #4

Updated by Andrew Lau about 9 years ago

Did you find a solution for this issue? Just hit the same one trying to publish a content view in katello.

E, [2015-04-08T22:09:21.197116 #2562] ERROR -- : Not found
x.x.x.x - - [08/Apr/2015 22:09:21] "GET /puppet/environments/KT_example_Library_OS_2_x86_64_4/classes HTTP/1.1" 404 9 0.3203

Actions #5

Updated by Justin Sherrill almost 9 years ago

Another cause of this is that the environment simply does not exist on the file system in /etc/puppet/environments/ (assuming that is where puppet is configured to look).

In the katello case, this can be because apache no longer has write access to /etc/puppet/environments (which is needed for pulp to create the puppet environment)

Actions #6

Updated by Anonymous almost 8 years ago

  • Status changed from New to Closed

no reaction, closing.

Actions

Also available in: Atom PDF