Puppet run on clients registered with Red Hat Satellite 6 fails with Evaluation Error: Error while evaluating a Function Call, 'new' Value of type Undef cannot be converted to Integer

Solution Verified - Updated

Environment

  • Red Hat Satellite 6

Issue

  • Below error is observed on clients registered with Satellite while running puppet agent -t command:

    root@client var]# puppet agent -t
    Info: Using configured environment 'development'
    Info: Retrieving pluginfacts
    Info: Retrieving plugin
    Info: Retrieving locales
    Info: Loading facts
    Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement,  Evaluation Error: Error while evaluating a Function Call, 'new' Value of type Undef cannot be converted to Integer (file: /etc/puppetlabs/code/environments/development/modules/ntp/manifests/init.pp, line: 62, column: 6) on node client.example.com
    Warning: Not using cache on failed catalog
    Error: Could not retrieve catalog; skipping run
    

Resolution

  • Install the redhat-lsb-core package on client machine which provides the lsbmajdistrelease fact being used by NTP module.

For more KB articles/solutions related to Red Hat Satellite 6.x Puppet Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Puppet Issues

Root Cause

  • The redhat-lsb-core package is missing on client machine which provides lsbmajdistrelease fact.

Diagnostic Steps

  • The NTP puppet module being used is getting failed at following line as mentioned in error: if(Integer($lsbmajdistrelease) < 8 )

  • Run below command on the client to check if lsbmajdistrelease is empty:

    # facter lsbmajdistrelease
    # puppet facts | grep lsbmajdistrelease
    
SBR
Product(s)
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.