Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type redis #86

Closed
aamerik opened this issue Feb 18, 2016 · 3 comments

Comments

@aamerik
Copy link

aamerik commented Feb 18, 2016

Hello. I'm trying to use create_resources() or ensure_resource() with this module and I'm running into issues with resource type 'redis' not found issues. I'm able to instantiate the module using "class { 'redis':}" but not with those two functioned mentioned. Is this a known limitation? Thanks

@arioch
Copy link
Contributor

arioch commented Feb 19, 2016

Could you provide the manifest you're using and a verbose log of what's going wrong?

@aamerik
Copy link
Author

aamerik commented Feb 19, 2016

Arioch,

My manifest looks like this:

class ops::redis::cache (
  $defaults   = 'UNSET',
  $instances = 'UNSET',
) {
  create_resources ('redis', $instances, $defaults)
}

And the resulting error is:

Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type redis at /etc/puppet/environments/qa3/modules/ops/manifests/redis/cache.pp:5 on node cache003.qa3.ca3.foo.co
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

The missing type error is confusing because if I change my manifest to:

class ops::redis::cache (
) {
  class { 'redis': 
     package_name => 'ops-redis28',
  }
}

the catalog compiles and executes as expected.

Do you know if I need to wrap the redis class in a define to make create_resources work as expected?

Thank you!

@aamerik aamerik closed this as completed Feb 19, 2016
@aamerik aamerik reopened this Feb 19, 2016
@aamerik
Copy link
Author

aamerik commented Feb 19, 2016

Didnt mean to close this. reopened.

@aamerik aamerik closed this as completed Feb 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants