postgresql
postgresql copied to clipboard
User creation fails when postgres user is not present
:pancakes: Cookbook version
lastest( 7.1.8 )
:tophat: Platform details
centos 7, AWS
Steps To Reproduce
Steps to reproduce the behavior:
We are using RDS provided by AWS. We do not have Postgres user either in RDS instance or on the machine. While we are trying to create user using resource postgresql_user. Recipe fails with the error -
can't find user for postgres (ArgumentError)
Figured out that the code has hardcoded username at - https://github.com/sous-chefs/postgresql/blob/master/resources/user.rb#L40
:police_car: Expected behavior
I should be able to create user even I don't have Postgres user.
Proposed solution -
Shouldn't we use the username from the params? I can raise the PR as well If it sounds good to you guys.
We would welcome a PR :+1:
Hi @JohnRoesler,
Could you please help me with failing tests on ubuntu? It's passing locally. I am running using vagrant locally but the log says we are using Dokken on CI. the Error is Command timed out after 900s and it does not look like something to do with my change. Could you please help with how can I run this with Dokken?
Thanks
Tried to converge locally with ident-ubuntu-1604
- looks like journalctl log has [email protected]: New main PID 2779 does not belong to service, and PID file is not owned by root. Refusing.
I am running chef exec kitchen test ident-ubuntu-1804
and it's working for me.
Could you please let me know the command that you are running?
Ah - probably dokken/docker vs. chef (virtualbox?). Are you running on VMs locally?
I run KITCHEN_LOCAL_YAML=kitchen.dokken.yml kitchen converge ident-ubuntu-1604
and it's hanging on the same command, starting the systemd daemon for postgres /bin/systemctl --system start postgresql
yeah, I am running VM's locally. I will try with docker. Thanks
This issue is affecting me also. I am unclear on the status of the PR, but if there's remaining work to be done here I am happy to help! What is the status? Just need to fix failing tests under ubuntu..?
@jgitlin-p21 I think the original author of the first PR abandoned it. Feel free to make a new one which addresses this!
I might do that @ramereth -- but I just discovered another issue with this cookbook which requires me to have a .pgpass
file, thus I do need a postgres
user (at least for now)
If I am able to make what I am trying to do work, then I will make a PR to contribute back!