Project

General

Profile

Actions

Bug #10624

closed

Error importing environments from smart-proxy (([NoMethodError]: undefined method `map' for true:TrueClass) for proxy)

Added by Ben Bettridge about 9 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Importers
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hey guys,

I'm experiencing an error when importing puppet environments, that started sometime in the last 24 hours. I've done a fair amount of troubleshooting and have hit a wall, I'm hoping someone more experienced would be able to shed some light. Some excerpts from the logs:

Foreman URL called

environments/import_environments?env=development&proxy=1-foreman-prod-internal

/var/log/foreman/production.log

ProxyAPI::ProxyException
ERF12-4115 [ProxyAPI::ProxyException]: Unable to get classes from Puppet for development ([NoMethodError]: undefined method `map' for true:TrueClass) for proxy https://foreman.prod.internal:8443/puppet
lib/proxy_api/puppet.rb:27:in `rescue in classes'
lib/proxy_api/puppet.rb:21:in `classes'
app/services/puppet_class_importer.rb:153:in `actual_classes'
app/services/puppet_class_importer.rb:77:in `new_classes_for'
app/services/puppet_class_importer.rb:38:in `changes'
app/controllers/concerns/foreman/controller/environments.rb:11:in `import_environments'
app/controllers/concerns/application_shared.rb:13:in `set_timezone'
app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call' 

/var/log/foreman-proxy/proxy.log

D, [2015-05-27T15:52:34.320387 #26219] DEBUG -- : verifying remote client 10.2.3.192 against trusted_hosts foreman.prod.internal
I, [2015-05-27T15:52:34.320911 #26219]  INFO -- : Initializing from Puppet config file: /etc/puppet/puppet.conf
I, [2015-05-27T15:52:34.429761 #26219]  INFO -- : Initializing from Puppet config file: /etc/puppet/puppet.conf

/etc/puppet/puppet.conf

[main]
    logdir = /var/log/puppet
    rundir = /var/run/puppet
    ssldir = $vardir/ssl

    privatekeydir = $ssldir/private_keys { group = service }
    hostprivkey = $privatekeydir/$certname.pem { mode = 640 }
    autosign       = $confdir/autosign.conf { mode = 664 }
    show_diff     = false

    hiera_config = $confdir/hiera.yaml

<!-- SNIP AGENT DETAILS -->

[master]
    autosign       = $confdir/autosign.conf { mode = 664 }
    reports        = foreman
    external_nodes = /etc/puppet/node.rb
    node_terminus  = exec
    ca             = true
    ssldir         = /var/lib/puppet/ssl
    certname       = foreman.prod.internal
    strict_variables = false

    environmentpath  = /etc/puppet/environments
    basemodulepath   = /etc/puppet/environments/common:/etc/puppet/modules:/usr/share/puppet/modules

/etc/foreman-proxy/settings.yml


:settings_directory: /etc/foreman-proxy/settings.d

# SSL Setup
:ssl_ca_file: /var/lib/puppet/ssl/certs/ca.pem
:ssl_certificate: /var/lib/puppet/ssl/certs/foreman.prod.internal.pem
:ssl_private_key: /var/lib/puppet/ssl/private_keys/foreman.prod.internal.pem

:trusted_hosts:
  - foreman.prod.internal

:daemon: true
:https_port: 8443

# shared options for virsh DNS/DHCP provider
:virsh_network: default

# Where our proxy log files are stored
# filename or STDOUT
:log_file: /var/log/foreman-proxy/proxy.log
# valid options are
# WARN, DEBUG, Error, Fatal, INFO, UNKNOWN
:log_level: DEBUG

#Ignore puppet.conf and use API
:puppet_use_environment_api: true

Actions

Also available in: Atom PDF