FAQ
Hi group,

I got a problem with environments, im getting this erros from the client:

Could not retrieve catalog from remote server: Error 400 on SERVER: Failed
to parse template ssh/retrieve_priv_key.erb: cannot find key directory:
/etc/puppet/environments/production/modules/ssh/private_keys at
/etc/puppet/environments/development/modules/ssh/manifests/init.pp:91

I dont know what is happening because it works before. My puppet.conf on
master is this:

[main]
logdir = /var/log/puppet
vardir = /var/lib/puppet
ssldir = /var/lib/puppet/ssl
rundir = /var/run/puppet
factpath = $vardir/lib/facter
templatedir = $confdir/templates
server = puppetserver.in.rentalia.com
environment = production

prerun_command = /etc/puppet/etckeeper-commit-pre
postrun_command = /etc/puppet/etckeeper-commit-post

[master]
manifest = $confdir/environments/$environment/manifests/site.pp
modulepath = $confdir/environments/$environment/modules

# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY

storeconfigs = true
dbadapter = mysql
dbname = puppetdb
dbuser = puppet
dbpassword = hola
dbserver = localhost
dbsocket = /var/run/mysqld/mysqld.sock

reports = log, foreman

[agent]
environment = production
report = true
pluginsync = true
show_diff = true

Anybody knows what happen?¿

Cheers from Madrid

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/LWeA0-guQDYJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Walter Heck at Dec 3, 2012 at 12:58 am
    I have seen this happen when a module exists in an environment and not in
    the main modulepath. Try copying it there, that might solve your problem.

    Walter
    On Thu, Nov 29, 2012 at 5:02 PM, Fran Rodríguez wrote:

    Hi group,

    I got a problem with environments, im getting this erros from the client:

    Could not retrieve catalog from remote server: Error 400 on SERVER:
    Failed to parse template ssh/retrieve_priv_key.erb: cannot find key
    directory: /etc/puppet/environments/production/modules/ssh/private_keys at
    /etc/puppet/environments/development/modules/ssh/manifests/init.pp:91

    I dont know what is happening because it works before. My puppet.conf on
    master is this:

    [main]
    logdir = /var/log/puppet
    vardir = /var/lib/puppet
    ssldir = /var/lib/puppet/ssl
    rundir = /var/run/puppet
    factpath = $vardir/lib/facter
    templatedir = $confdir/templates
    server = puppetserver.in.rentalia.com
    environment = production

    prerun_command = /etc/puppet/etckeeper-commit-pre
    postrun_command = /etc/puppet/etckeeper-commit-post

    [master]
    manifest = $confdir/environments/$environment/manifests/site.pp
    modulepath = $confdir/environments/$environment/modules

    # These are needed when the puppetmaster is run by passenger
    # and can safely be removed if webrick is used.
    ssl_client_header = SSL_CLIENT_S_DN
    ssl_client_verify_header = SSL_CLIENT_VERIFY

    storeconfigs = true
    dbadapter = mysql
    dbname = puppetdb
    dbuser = puppet
    dbpassword = hola
    dbserver = localhost
    dbsocket = /var/run/mysqld/mysqld.sock

    reports = log, foreman

    [agent]
    environment = production
    report = true
    pluginsync = true
    show_diff = true

    Anybody knows what happen?¿

    Cheers from Madrid

    --
    You received this message because you are subscribed to the Google Groups
    "Puppet Users" group.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/puppet-users/-/LWeA0-guQDYJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to
    puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/puppet-users?hl=en.


    --
    Walter Heck

    --
    Check out my startup: Puppet training and consulting @
    http://www.olindata.com
    Follow @olindata on Twitter and/or 'Like' our Facebook page at
    http://www.facebook.com/olindata

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Fran Rodríguez at Dec 3, 2012 at 9:27 am
    Thanks Walter for the answer, but thats its not a solution because maybe
    there are plugins which are in development environment and arent on
    production. I already found the solution this weekend, the problem was the
    module ssh, it was too old. I have to patch the module for what it accepts
    environments variable:

    Puppet::Module.find "ssh", environment

    This was to add on the template for it works.

    On Mon, Dec 3, 2012 at 1:57 AM, Walter Heck wrote:

    I have seen this happen when a module exists in an environment and not in
    the main modulepath. Try copying it there, that might solve your problem.

    Walter

    On Thu, Nov 29, 2012 at 5:02 PM, Fran Rodríguez wrote:

    Hi group,

    I got a problem with environments, im getting this erros from the client:

    Could not retrieve catalog from remote server: Error 400 on SERVER:
    Failed to parse template ssh/retrieve_priv_key.erb: cannot find key
    directory: /etc/puppet/environments/production/modules/ssh/private_keys at
    /etc/puppet/environments/development/modules/ssh/manifests/init.pp:91

    I dont know what is happening because it works before. My puppet.conf on
    master is this:

    [main]
    logdir = /var/log/puppet
    vardir = /var/lib/puppet
    ssldir = /var/lib/puppet/ssl
    rundir = /var/run/puppet
    factpath = $vardir/lib/facter
    templatedir = $confdir/templates
    server = puppetserver.in.rentalia.com
    environment = production

    prerun_command = /etc/puppet/etckeeper-commit-pre
    postrun_command = /etc/puppet/etckeeper-commit-post

    [master]
    manifest = $confdir/environments/$environment/manifests/site.pp
    modulepath = $confdir/environments/$environment/modules

    # These are needed when the puppetmaster is run by passenger
    # and can safely be removed if webrick is used.
    ssl_client_header = SSL_CLIENT_S_DN
    ssl_client_verify_header = SSL_CLIENT_VERIFY

    storeconfigs = true
    dbadapter = mysql
    dbname = puppetdb
    dbuser = puppet
    dbpassword = hola
    dbserver = localhost
    dbsocket = /var/run/mysqld/mysqld.sock

    reports = log, foreman

    [agent]
    environment = production
    report = true
    pluginsync = true
    show_diff = true

    Anybody knows what happen?¿

    Cheers from Madrid

    --
    You received this message because you are subscribed to the Google Groups
    "Puppet Users" group.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/puppet-users/-/LWeA0-guQDYJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to
    puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/puppet-users?hl=en.


    --
    Walter Heck

    --
    Check out my startup: Puppet training and consulting @
    http://www.olindata.com
    Follow @olindata on Twitter and/or 'Like' our Facebook page at
    http://www.facebook.com/olindata

    --
    You received this message because you are subscribed to the Google Groups
    "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to
    puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/puppet-users?hl=en.


    --
    Fran Rodríguez
    escala NetLabel
    http://escalared.com

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Llowder at Dec 3, 2012 at 2:31 pm

    On Thursday, November 29, 2012 9:02:27 AM UTC-6, Fran Rodríguez wrote:
    Hi group,

    I got a problem with environments, im getting this erros from the client:

    Could not retrieve catalog from remote server: Error 400 on SERVER:
    Failed to parse template ssh/retrieve_priv_key.erb: cannot find key
    directory: /etc/puppet/environments/production/modules/ssh/private_keys at
    /etc/puppet/environments/development/modules/ssh/manifests/init.pp:91

    I dont know what is happening because it works before. My puppet.conf on
    master is this:

    [main]
    logdir = /var/log/puppet
    vardir = /var/lib/puppet
    ssldir = /var/lib/puppet/ssl
    rundir = /var/run/puppet
    factpath = $vardir/lib/facter
    templatedir = $confdir/templates
    server = puppetserver.in.rentalia.com
    environment = production

    prerun_command = /etc/puppet/etckeeper-commit-pre
    postrun_command = /etc/puppet/etckeeper-commit-post

    [master]
    manifest = $confdir/environments/$environment/manifests/site.pp
    modulepath = $confdir/environments/$environment/modules
    You need to either make sure that every environment has a copy of every
    module you want to use in that environment, OR change your modulepath to
    include a common, shared area.

    I use environments on 2.7.x w/o any problems.

    My modulepath is:
    modulepath = $confdir/environments/$environment/modules:$confdir/modules

    I use the environments directory for all of my custom / normal modules, and
    then put all of my plugin type / shared modules (like stdlib, concat,
    hiera-puppet and the 'custom' module I use for distributing my custom
    facts, types, providers, functions etc)



    # These are needed when the puppetmaster is run by passenger
    # and can safely be removed if webrick is used.
    ssl_client_header = SSL_CLIENT_S_DN
    ssl_client_verify_header = SSL_CLIENT_VERIFY

    storeconfigs = true
    dbadapter = mysql
    dbname = puppetdb
    dbuser = puppet
    dbpassword = hola
    dbserver = localhost
    dbsocket = /var/run/mysqld/mysqld.sock

    reports = log, foreman

    [agent]
    environment = production
    report = true
    pluginsync = true
    show_diff = true

    Anybody knows what happen?¿

    Cheers from Madrid
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/ZlwHUiIFGU0J.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Fran Rodríguez at Dec 3, 2012 at 3:57 pm
    +1.

    Thats my route and thats what i think, but if the module doesnt use
    enviroment variable to create the path... bad!! Well, i mean old modules,
    like mine.

    Cheers
    On Monday, 3 December 2012 15:25:05 UTC+1, llowder wrote:


    On Thursday, November 29, 2012 9:02:27 AM UTC-6, Fran Rodríguez wrote:

    Hi group,

    I got a problem with environments, im getting this erros from the client:

    Could not retrieve catalog from remote server: Error 400 on SERVER:
    Failed to parse template ssh/retrieve_priv_key.erb: cannot find key
    directory: /etc/puppet/environments/production/modules/ssh/private_keys at
    /etc/puppet/environments/development/modules/ssh/manifests/init.pp:91

    I dont know what is happening because it works before. My puppet.conf on
    master is this:

    [main]
    logdir = /var/log/puppet
    vardir = /var/lib/puppet
    ssldir = /var/lib/puppet/ssl
    rundir = /var/run/puppet
    factpath = $vardir/lib/facter
    templatedir = $confdir/templates
    server = puppetserver.in.rentalia.com
    environment = production

    prerun_command = /etc/puppet/etckeeper-commit-pre
    postrun_command = /etc/puppet/etckeeper-commit-post

    [master]
    manifest = $confdir/environments/$environment/manifests/site.pp
    modulepath = $confdir/environments/$environment/modules
    You need to either make sure that every environment has a copy of every
    module you want to use in that environment, OR change your modulepath to
    include a common, shared area.

    I use environments on 2.7.x w/o any problems.

    My modulepath is:
    modulepath = $confdir/environments/$environment/modules:$confdir/modules

    I use the environments directory for all of my custom / normal modules,
    and then put all of my plugin type / shared modules (like stdlib, concat,
    hiera-puppet and the 'custom' module I use for distributing my custom
    facts, types, providers, functions etc)



    # These are needed when the puppetmaster is run by passenger
    # and can safely be removed if webrick is used.
    ssl_client_header = SSL_CLIENT_S_DN
    ssl_client_verify_header = SSL_CLIENT_VERIFY

    storeconfigs = true
    dbadapter = mysql
    dbname = puppetdb
    dbuser = puppet
    dbpassword = hola
    dbserver = localhost
    dbsocket = /var/run/mysqld/mysqld.sock

    reports = log, foreman

    [agent]
    environment = production
    report = true
    pluginsync = true
    show_diff = true

    Anybody knows what happen?¿

    Cheers from Madrid
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/35OhHejzmX0J.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedNov 29, '12 at 3:02p
activeDec 3, '12 at 3:57p
posts5
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase