Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Catalog doesnt compile at centos7 box with puppet4.2 and puppi => true #8

Open
cloudsurf-digital opened this issue Mar 31, 2016 · 5 comments

Comments

@cloudsurf-digital
Copy link

Probably $puppivars=get_class_args() is undefined....

 class{'solr':
    template            => "${module_name}/etc/solr46.conf.erb",
    options             => {
      'solr_home'        => $solr_home,
      'solr_user'          => $solr_user,
      'solr_data'          => $solr_data,
      'startup_options' => $startup_options,
    },
    puppi               => true,
    debug              => true,
    monitor            => true,
    install_source      => 'http://www.apache.org/dist/lucene/solr/5.5.0/solr-5.5.0.tgz',
    install_destination => $solr_home,
    data_dir            => $solr_data,
  }

This results in:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, Failed to parse inline template: undefined local variable or method `puppivars' for #<Puppet::Parser::TemplateWrapper:0x105733a5> at /data/puppet/code/environments/TestSolr/external-modules/solr/manifests/init.pp:223:18 on node XXXXXX
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
alvagante added a commit that referenced this issue Mar 31, 2016
@alvagante
Copy link
Member

Please check if the referenced commit fixes this issue

@cloudsurf-digital
Copy link
Author

👍 Thanks, but now the catalog misses an include puppi... i wrote it in the parent class but normally i would assume that its part of solr class if i set puppet => true explicitly

@cloudsurf-digital
Copy link
Author

Now

Any hints?

Error: Could not set 'present' on ensure: No such file or directory @ dir_s_rmdir - /opt/puppetlabs/server/data/puppetserver/puppi/solr20160331-27503-1fvmec7.lock at 216:/data/puppet/code/environments/NewSolrModule/external-modules/solr/manifests/init.pp
Error: Could not set 'present' on ensure: No such file or directory @ dir_s_rmdir - /opt/puppetlabs/server/data/puppetserver/puppi/solr20160331-27503-1fvmec7.lock at 216:/data/puppet/code/environments/NewSolrModule/external-modules/solr/manifests/init.pp
Wrapped exception:
No such file or directory @ dir_s_rmdir - /opt/puppetlabs/server/data/puppetserver/puppi/solr20160331-27503-1fvmec7.lock
Error: /Stage[main]/Solr/File[puppi_solr]/ensure: change from absent to present failed: Could not set 'present' on ensure: No such file or directory @ dir_s_rmdir - /opt/puppetlabs/server/data/puppetserver/puppi/solr20160331-27503-1fvmec7.lock at 216:/data/puppet/code/environments/NewSolrModule/external-modules/solr/manifests/init.pp

@cloudsurf-digital
Copy link
Author

Ok, further investigations:

https://github.com/example42/puppet-solr/blob/master/manifests/init.pp#L218

here happens a lookup on ${settings::vardir} which is in case of puppet > 3 < 4:

└─[15:01]$ sudo puppet apply -e 'notify {"${settings::vardir}":}'
Notice: Compiled catalog for xxx in environment production in 0.11 seconds
Notice: /var/lib/puppet
Notice: /Stage[main]/Main/Notify[/var/lib/puppet]/message: defined 'message' as '/var/lib/puppet'
Notice: Finished catalog run in 0.26 seconds

on puppet > 4 its:

└─[15:02]$ sudo /opt/puppetlabs/bin/puppet apply -e 'notify {"${settings::vardir}":}'
Warning: Facter: timeout option is not supported for custom facts and will be ignored.
Notice: Compiled catalog for xxx in environment production in 0.06 seconds
Notice: /opt/puppetlabs/puppet/cache
Notice: /Stage[main]/Main/Notify[/opt/puppetlabs/puppet/cache]/message: defined 'message' as '/opt/puppetlabs/puppet/cache'
Notice: Applied catalog in 0.26 seconds

But for any reasons on puppet >4 on puppetmasters its during catalog compilation time: /opt/puppetlabs/server/data/puppetserver/

@alvagante
Copy link
Member

So, the error No such file or directory @ dir_s_rmdir - /opt/puppetlabs/server/data/puppetserver/puppi/solr20160331-27503-1fvmec7.lock is due to a missing parent directory of the vardir. The quick workaround should be to specify it explicitly.

For the puppi include, I'd prefer to avoid it, as it installs the puppi command and all its dependencies and this might not be wanted. The puppi::netinstall define should be autoloaded, if puppi is in the module path. I should test this better on Puppet4

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants