Unknown resource type after Upgrade

308 views
Skip to first unread message

Christian Reiß

unread,
Sep 27, 2018, 10:14:19 AM9/27/18
to Puppet Users
Hey folks,

I am currently upgrading to 6.x on a test setup using my live puppet code; trying to get it to work with 6.x.
One weird issue I am getting is that alle default definitions (upper case classes) are faulting:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Resource type not found: Nagios_service (file: /etc/puppetlabs/code/environments/production/modules/pn_icinga/manifests/client/checks.pp, line: 83, column: 3) on node outleapt.test
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run



The corresponding manifest looks like this:

Nagios_service {
    check_period          
=> '24x7',
   
ensure                => $::pn_icinga::client::installed,
    host_name            
=> $::trusted['certname'],
    initial_state        
=> 'o',
    max_check_attempts    
=> '3',
    notification_interval
=> '5',
    notification_options  
=> 'w,u,c,r',
    notification_period  
=> $notification_period,
    notifications_enabled
=> '0',
   
[...]
}

Did I miss a regression somewhere?
Any help is greatly appreciated!

-Chris.

Rafael Tomelin

unread,
Sep 27, 2018, 10:25:34 AM9/27/18
to puppet...@googlegroups.com
Hi dear,

This link the puppet6 release notes.

  • The Nagios types no longer ship with Puppet, and are now available as the puppetlabs/nagios_core module from the Forge.

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/bde5ac1d-f1ef-4454-885d-b499f22062c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Atenciosamente,

Rafael Tomelin

skype: rafael.tomelin

E-mail: rafael....@gmail.com

RHCE      - Red Hat Certified Engineer
PPT-205 - Puppet Certified Professional 2017
Zabbix    - ZABBIX Certified Specialist
LPI3 
ITIL v3

Christian Reiß

unread,
Sep 27, 2018, 10:55:43 AM9/27/18
to Puppet Users
Hey Rafael,

thanks for your reply. Ironically I was readind the deprecated logs and seem to have missed that, After doing a puppet module install the error changed to

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Type-Name, Could not autoload puppet/type/nagios_service: no such file to load -- puppet/util/nagios_maker (file: /etc/puppetlabs/code/environments/production/modules/pn_icinga/manifests/client/raid.pp, line: 15, column: 3) on node outleapt.test

Mind pushing me once more in the right direction?

-Chris.

Josh Cooper

unread,
Sep 27, 2018, 5:36:42 PM9/27/18
to puppet...@googlegroups.com
On Thu, Sep 27, 2018 at 3:55 AM Christian Reiß <reiss.s...@gmail.com> wrote:
Hey Rafael,

thanks for your reply. Ironically I was readind the deprecated logs and seem to have missed that, After doing a puppet module install the error changed to

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Type-Name, Could not autoload puppet/type/nagios_service: no such file to load -- puppet/util/nagios_maker (file: /etc/puppetlabs/code/environments/production/modules/pn_icinga/manifests/client/raid.pp, line: 15, column: 3) on node outleapt.test


This is a bug in the nagios_core module. Any time a module type or provider loads helper code (for example https://github.com/puppetlabs/puppetlabs-nagios_core/blob/d97ec08c78d966a500cf172f6575329f82df27a6/lib/puppet/type/nagios_service.rb#L1) it needs to use require_relative or pass a relative path to require. The reason is because the master needs to serve multiple environments, so we can't add the environment-specific module path to the global ruby $LOAD_PATH. Please open a MODULES ticket with component set to nagios_core.

This wasn't an issue prior to puppet6, because the nagios type/provider was in core puppet, and so was in the $LOAD_PATH.


For more options, visit https://groups.google.com/d/optout.


--
Josh Cooper | Software Engineer

Christian Reiß

unread,
Sep 28, 2018, 8:04:27 AM9/28/18
to Puppet Users
Hey,

thank you--
that clears that up. Seems like time will solve the issue; postponing the update for now.

Josh Cooper

unread,
Sep 28, 2018, 9:34:13 PM9/28/18
to puppet...@googlegroups.com
On Fri, Sep 28, 2018 at 1:04 AM Christian Reiß <reiss.s...@gmail.com> wrote:
Hey,

thank you--
that clears that up. Seems like time will solve the issue; postponing the update for now.

Filed as https://tickets.puppetlabs.com/browse/MODULES-8015. We should have a fix by early next week.
 
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Josh Cooper

unread,
Oct 2, 2018, 10:43:49 PM10/2/18
to puppet...@googlegroups.com
On Fri, Sep 28, 2018 at 2:33 PM Josh Cooper <jo...@puppet.com> wrote:
>
>
>
> On Fri, Sep 28, 2018 at 1:04 AM Christian Reiß <reiss.s...@gmail.com> wrote:
>>
>> Hey,
>>
>> thank you--
>> that clears that up. Seems like time will solve the issue; postponing the update for now.
>
>
> Filed as https://tickets.puppetlabs.com/browse/MODULES-8015. We should have a fix by early next week.

Thanks to Peter Meier (duritong) this is fixed in nagios_core version
1.0.2, which was released to the forge today[1].

We had a similar issue with the augeas_core modules, and version 1.0.3
was released today as well[2]. Note it wasn't fatal like the nagios
case, because augeas is bundled into the puppet-agent package, but
nagios is not.

We also filed a request to improve pdk validation to detect when a
type or provider requires helper in a way that requires the helper
code to be in the ruby load path[3].

Josh

[1] https://forge.puppet.com/puppetlabs/nagios_core
[2] https://forge.puppet.com/puppetlabs/augeas_core
[3] https://tickets.puppetlabs.com/browse/PDK-1196
Reply all
Reply to author
Forward
0 new messages