After successfully deploying to a data center, why does an Error 500 Unknown Resource Type occur after deploying to another data center running 'puppet agent -t'?

asked 2018-10-19 13:28:19 -0600 gravatar image

Despite finding several somewhat related references to this issue (Error 500) on the Internet, the cause of this particular error (Error 500: Puppet Unknown Resource Type) eludes me. Please help me resolve this issue (and thank you in advance).

Problem Statement

We have three data centers: DC-East and DC-West.

After successfully deploying to DC-East, I added the following code to 'site.pp' and attempted to deploy to DC-West:

node /west02/
    include role::puppet_server
    include role::puppet_server_db

After the deployment, running 'puppet agent -t' resulted in the following error message:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error:Error while evaluating a Resource Statement, **Unknown resource type**: 'profile_d::script' (file: /etc/puppetlabs/code/environments/test/site/profile/manifests/prereq/timeout.pp, line: 3, column: 4) on node west01

Warning: Not using cache on failed catalog

Error: Could not retrieve catalog; skipping run

Note that no errors occurred when I re-ran 'puppet agent -t' (with the aforementioned change) on a Puppet Agent in DC-East.


                Git                         git add, commit, and push
    Puppet Master of Masters                 mco r10k deploy test -v OR mco r10k synchronize
           |          |
        DC-East    DC-West     
          |           |
    Puppet Master   Puppet Master
          |           |
    Puppet Agents   Puppet Agents            puppet agent -t --debug
          |           |
       east01        west01
  • Certificate Authority not shown.
  • Linux servers are used (e.g. Linux west01 2.6.32-696.23.1.el6.x86_64 #1 SMP Sat Feb 10 11:10:31 EST 2018 x86_64 x86_64 x86_64 GNU/Linux).


There are two instances of 'profile_d' in the project:

Puppetfile:     mod 'marcgascon-profile_d', '0.1.0'
timeout.pp:     class profile::prereq::timeout
                    profile_d::script { '':
                    ensure        => present,
                    content_file  => 'profile/',

'prereq.pp' contains:

class role::prereq {
                                include profile::prereq::hostfile
                                include profile::prereq::timeout    <<< Generates Error
                                include profile::prereq::user_add
                                include profile::prereq::sshkey
                                include profile::prereq::sudoer     <<< Same Error if timeout commented out
                                include profile::prereq::ulimit
                                include profile::prereq::resolv_conf
                                include profile::prereq::nexus_get_and_untar


Note that if 'include profile::prereq::timeout' is removed then the same error occurs on 'include profile::prereq::sudoer'.

'sudoer.pp' contains entries like: class profile::prereq::sudoer { sudo::conf { 'bbbyrelease': content => 'bbbyrelease ALL=(ALL) NOPASSWD: ALL', } }

I would be grateful for your thoughts and/or suggestions.


edit retag flag offensive close merge delete