Ask Your Question
0

Exported resources suddenly failing - Syntax error at '<<|'

asked 2017-03-09 09:14:42 -0500

janos gravatar image

updated 2017-03-09 09:15:33 -0500

Hello,

from one day to another my exported resources are failing. I just cannot find the error. My client runs on 3.6.2-3, here is what he complains about:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Syntax error a**t '<<|'; expected '|>>'** at /etc/puppet/environments/development/modules/icinga2/manifests/server.pp:6 on node masterblaster.yuppidee.com Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run

Server runs on: puppet-3.8.7-1.el7.noarch

Now thats the class:

class icinga2::server {
        include icinga2::server::params
        icinga2::client::Icinga2_host <<| |>> # realize all exported resources
}

Heres the exported resource definition:

 @@icinga2::client::icinga2_host { "/opt/puppet/icinga2-$networklayer-hosts/$fqdn.conf":
               [ .. a lot of parameters ..]
                p_architecture  => $architecture,
                p_kernel        => $kernel,
               [ .. a lot of parameters ..]
         }

define icinga2::client::icinga2_host($p_hosttemplate,[... a lot of parameters .. ]){
        file { "${name}":
                ensure          =>      present,
                content         =>      template('icinga2/client/icinga2_host.erb'),
                owner           =>      'icinga',
                group           =>      'icinga',
        }
}

Does anyone have any idea? I havent touched the module for a longer time as far as I know. Neither updated the client nor server. I am bit a stuck here. Yes, I know an update would be very recommended, ... got it on my list :-P

Bye :)

edit retag flag offensive close merge delete

Comments

You have to capitalize the first character of each component: Icinga2::Client::Icinga2_host <<| |>> https://docs.puppet.com/puppet/latest/lang_collectors.html .

Kai Burghardt gravatar imageKai Burghardt ( 2017-03-09 10:30:47 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2017-03-10 01:04:01 -0500

janos gravatar image

updated 2017-03-10 01:10:40 -0500

Ah yeah that was my original error that I got..sorry for changing / confusing things .

   Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find type Icinga2::Server::Icinga2_host on node masterblaster

Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run

However, here is what I changed:

   class icinga2::server {
    include icinga2::server::params
    icinga2::client::Icinga2_host <<| |>> # realize all exported resources

}

in the client module:

     @@icinga2::client::icinga2_host { "/opt/puppet/icinga2-$networklayer-hosts/$fqdn.conf":

The icinga2_host.pp:

     define icinga2::client::icinga2_host(...){
edit flag offensive delete link more

Comments

Ensure your files are located acording the standard module layout https://docs.puppet.com/puppet/latest/modules_fundamentals.html#using-modules so the autoloader can find the files.

Kai Burghardt gravatar imageKai Burghardt ( 2017-03-11 11:11:38 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-03-09 09:14:42 -0500

Seen: 36 times

Last updated: Mar 10