Support #17462
closedfailed to import classes
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
Updated by Slagian Momirovici about 8 years ago
- Related to Support #9091: Import Puppet Environments added
Updated by Slagian Momirovici about 8 years ago
Updated by Slagian Momirovici about 8 years ago
- File smartproxy_settings.yml smartproxy_settings.yml added
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:
- The manifests are failing to parse, the smart proxy may not list errors. Use
puppet parser validate
to check. - The manifests don't contain classes.
- 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
Updated by Slagian Momirovici about 8 years ago
oki, I will test this today and update.
Updated by Slagian Momirovici about 8 years ago
- File smarproxy_logs241116 smarproxy_logs241116 added
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.
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.
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:- :colorize: false
- :console_inline: false
- :log_trace: true
- :level: debug
- :type: file
- :pattern: "%d .8X{session} [%c] [.1l] %m\n"
- :filename: "/var/log/ph/foreman/production.log"
Updated by Slagian Momirovici about 8 years ago
- Status changed from New to Resolved
It seems i missread doc, all ok and thank you.