Project

General

Profile

Actions

Support #17462

closed

failed to import classes

Added by Slagian Momirovici about 8 years ago. Updated about 8 years ago.

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

Description

Hi,
it seems I am having some problems when importing classes. After a lot of trials I think I should raise this issue with you, nothing helped till now.

Our scenario and current setup:
OS: SLES 12.1
puppet master:*3.8.5 (os installed)
*smart-proxy:
1.13.1 (installed from source)
foreman: 1.13.1 (installed from source)

Notes:
1. Our smart/foreman/puppetmaster all reside on 1 server
2. Our smart/foreman are deployed under a separate user deployer (deployer is a member of puppet group), using rvm and ruby 2.3.0.please see attached
3. Our puppet master is OS installed under ruby 2.1.0

Previous setup: I've previously tried versions 1.12.0, 1.12.1 for smart and foreman + directory environments + r10k - puppet working fine--> getting in the same place. Environments where detected correctly (dev, prod, uat), but when smart-proxy --> importing classes --> "No changes detected to your environment"

Current setup: no directory environments, just single default production environment --> importing classes --> "No changes detected to your environment"

the smart proxy/foreman: has gems --> please see deployeruser_gems.log

Attached also config files.

Can you please help us related?


Files

deployeruser_gems.log deployeruser_gems.log 3.46 KB Slagian Momirovici, 11/23/2016 07:21 AM
puppet.conf puppet.conf 1.61 KB Slagian Momirovici, 11/23/2016 07:22 AM
smartproxy_log.log smartproxy_log.log 2.95 KB Slagian Momirovici, 11/23/2016 07:22 AM
foreman_log.log foreman_log.log 1.37 KB Slagian Momirovici, 11/23/2016 07:25 AM
smartproxy_puppet_proxy_legacy.yml smartproxy_puppet_proxy_legacy.yml 817 Bytes Slagian Momirovici, 11/23/2016 07:30 AM
smartproxy_puppet.yml smartproxy_puppet.yml 485 Bytes Slagian Momirovici, 11/23/2016 07:30 AM
smartproxy_settings.yml smartproxy_settings.yml 1.88 KB Slagian Momirovici, 11/23/2016 07:31 AM
smarproxy_logs241116 smarproxy_logs241116 1.63 KB Slagian Momirovici, 11/24/2016 06:10 AM

Related issues 1 (0 open1 closed)

Related to Foreman - Support #9091: Import Puppet EnvironmentsResolved01/23/2015Actions
Actions #1

Updated by Slagian Momirovici about 8 years ago

Actions #4

Updated by Dominic Cleal about 8 years ago

  • Category changed from Smart Proxy to Puppet integration

The smart proxy log looks reasonably successful, it's listing manifests that are being parsed for classes. I'd suggest one these options is likely:

  1. The manifests are failing to parse, the smart proxy may not list errors. Use puppet parser validate to check.
  2. The manifests don't contain classes.
  3. The classes are ignored by Foreman's ignored_environments.yml

Can you view the output of the smart proxy API call by using cURL? e.g. curl http://proxy.example.com:8000/puppet/environments/production/classes

Actions #5

Updated by Dominic Cleal about 8 years ago

  • Tracker changed from Bug to Support
Actions #6

Updated by Slagian Momirovici about 8 years ago

oki, I will test this today and update.

Actions #7

Updated by Slagian Momirovici about 8 years ago

Hi Dominic,

Back with answers:

Note: I have left only 2 modules, removed * of them for debugging purposes. And replaced "import module" with "include module" in site.pp
stdlib
logrotate

--------------------------
The smart proxy log looks reasonably successful, it's listing manifests that are being parsed for classes. I'd suggest one these options is likely:

The manifests are failing to parse, the smart proxy may not list errors. Use puppet parser validate to check. ---> Parsing fine now
The manifests don't contain classes. ---> contains classes
The classes are ignored by Foreman's ignored_environments.yml - in foreman I have only config/ignored_environments.yml.sample, it is not used

Can you view the output of the smart proxy API call by using cURL? e.g. curl http://proxy.example.com:8000/puppet/environments/production/classes
A: curl http://puppetmaster2.phgroup.com:8000/puppet/environments/production/classes --> []
it does not see them it seems.

Actions #8

Updated by Dominic Cleal about 8 years ago

  • Project changed from Foreman to Smart Proxy
  • Category changed from Puppet integration to Puppet

Thanks, that does confine the problem to the smart proxy, but doesn't show any likely cause.

Re-reading the description, I'm unsure that Puppet and the smart proxy are correctly set up.

puppet master:*3.8.5 (os installed)
[..]
2. Our smart/foreman are deployed under a separate user deployer (deployer is a member of puppet group), using rvm and ruby 2.3.0.please see attached

The "Syck" errors in your deployeruser_gems.log file is because Puppet 3.x is being used under Ruby 2.3.0, which isn't compatible (see https://docs.puppet.com/guides/platforms.html#ruby-versions).

The smart proxy when using Puppet 3.x will need to load Puppet to parse manifests, so it must be run under a mutually compatible version. I'd suggest trying to run the smart proxy under 2.1.0 as well (or upgrade to Puppet 4, which doesn't have these issues).

Lastly, there are both Puppet 4 and 3 gems listed in the Bundler output, so ensure you run the smart proxy with bundle exec to use the one specified in your Gemfile/Gemfile.lock. If not then it might be trying to use Puppet 4.

Actions #9

Updated by Slagian Momirovici about 8 years ago

Dominic, works fine ), thank you very much --> so the issue was ruby version, my fault
I've setup also directory environments and picked ok.
-----------------------------------------------
However I have a small question?
How can I change "foreman" log path? currently goes to ./foreman/log/production.log

I've tried in settings.yaml and logging.yaml the bellow settings and no avail ~ it will not record logs under none of the paths then, complains that no appender was set and going to STDOUT, however STDOUT has nothing.

#:default:
  1. :colorize: false
  2. :console_inline: false
  3. :log_trace: true
  4. :level: debug
  5. :type: file
  6. :pattern: "%d .8X{session} [%c] [.1l] %m\n"
#:production:
  1. :filename: "/var/log/ph/foreman/production.log"
Actions #10

Updated by Slagian Momirovici about 8 years ago

  • Status changed from New to Resolved

It seems i missread doc, all ok and thank you.

Actions

Also available in: Atom PDF