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

Custom resource #50

Open
masikmos opened this issue Sep 10, 2019 · 2 comments
Open

Custom resource #50

masikmos opened this issue Sep 10, 2019 · 2 comments

Comments

@masikmos
Copy link

masikmos commented Sep 10, 2019

i use zabbix_lwrp him depends postgresql cookbook but i want use postgresql-lwrp BUT! When i use postgresql_user or postgresql_database Custom resource chef use it from postgresql and i see error

[2019-09-10T17:58:48+03:00] ERROR: undefined method in_version' for Custom resource postgresql_user from cookbook postgresql

What i need to do for use Custom resource from postgresql-lwrp in my recipe ??? Help...

@dragonsmith
Copy link
Collaborator

@masikmos Hello!

Thank you for your question and for pointing out to the problem. I'm investigating the situation but I do not have an elegant solution for you right now.

zabbix_lwrp uses postgresql cookbook at least because it supports more platforms so it is unwise to open an issue or PR to migrate to postgresql_lwrp.

I see two ways to address your situation:

  1. fork zabbix_lwrp and remove postgresql.rb recipe with depends "postgresql"
  2. try this: https://stackoverflow.com/questions/51271247/when-two-different-resources-from-two-cookbooks-have-the-same-name-how-can-i-sp

@masikmos
Copy link
Author

nope... link dont work...

i do that

Chef.resource_priority_map.priority(:postgresql_user, [postgresql_lwrp::user]) Chef.resource_priority_map.priority(:postgresql_database, [postgresql_lwrp::database])

and got

[2019-09-12T00:29:53+03:00] ERROR: undefined local variable or method postgresql_lwrp' for cookbook: default, recipe: postgresql11_dbuser :Chef::Recipe

any words after ... [postgresql_lwrp:: do nothing, all time undefined local variable or method `postgresql_lwrp'...

fix 1 should be worked, but i want resource priority )))

Any more ideas? )
Maybe i do something wrong?

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