Ask Your Question
0

Resource type <resource_name> doesn't exist [ SOLVED ]

asked 2016-12-21 03:51:48 -0500

craymore gravatar image

updated 2017-02-08 06:55:02 -0500

Hello dear puppeteers,

I am getting an error message from a puppetserver which I'm trying to understand;

Error while evaluating a Virtual Query, Resource type nfs_mount doesn't exist

Here's the code snipet triggering that error ( the LAST line ) :

  class profiles::nfs ()
  {
      $mountlist = hiera_hash('profiles::nfs::mountlist')
      validate_legacy(Hash, 'validate_hash', $mountlist)
      create_resources('@::profiles::nfs_mount', $mountlist)
      Class['::profiles::system::nfs'] -> Nfs_mount <| |>
}

The resource nfs_mount is well defined in another manifest :

define profiles::nfs_mount( $device, $mount_path, $mount_rights, $key = $name ) {
...
}

So why can't the puppetserver find it ?

Thanks beforehand for any help

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-12-21 07:17:58 -0500

DarylW gravatar image

updated 2016-12-21 07:19:01 -0500

You don't have the define namespaced properly. It needs to be Profiles::Nfs_mount I believe. If it was a native type/provider, I don't think you would need to namespace it, but a define needs to be found by the automatic class lookup.

However, If I was you, I would probably make my own 'nfs_mount' utility module and put it in there, and not have it in my profile.

edit flag offensive delete link more

Comments

1

Providing the fully scoped name did work ! Regarding the utility module, I was thinking about doing something in that way ( this isn't my code : I'm currently revisiting it to make some improvements )

craymore gravatar imagecraymore ( 2016-12-21 10:16:18 -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: 2016-12-21 03:51:48 -0500

Seen: 50 times

Last updated: Feb 08