Open boydj opened 8 years ago
Thanks for reporting that @boydj ! Would you mind submitting a PR to re-add those lines?
I think if these lines were to go somewhere, they would be in the omnibus-supermarket recipe that is internal to the omnibus package. I propose that this issue move to the chef/supermarket
repo under the guise of "handle PG database ownership and enabling PG extensions when PG is run external to the omnibus install." The solution might be something other than flipping these resources off if omnibus'd-postgresql is disabled. For example, I can picture adding to the database recipe a .pgpass
file for psql
commands to pick up and use to authenticate to wherever PG is running during these configuration steps.
Looking a bit closer at the error, the specific error has to do with the expectation that the execute resource for the psql command will be run with an OS user that matches the name of a user within the PostgreSQL service who has the privileges to install extensions. This is true for the default install—supermarket
OS service account and supermarket
PG database user—but not necessarily true for a PG database configured elsewhere. In @boydj's case, there is a chef
user in the RDS database, but that an OS user of the same name does not exist on the Supermarket host (and also maybe shouldn't).
I sense that the bug here is assuming that an OS user for the command to install extensions will match an admin DB user. We should spend a little time unpacking that.
I can confirm that changing the DB user to match a system user, in this case, supermarket, allows installation to complete successfully.
Thanks for the confirmation, @boydj. That helps shape our options. I see them as:
supermarket
(increased cognitive load on the humans performing an install)Are those reasonable? Are there others?
Error executing action
run
on resource 'execute[create postgresql plpgsql extensionWith the following config in my wrapper cookbook:
Looks like this was fixed previously here: https://github.com/chef-boneyard/omnibus-supermarket/pull/20/commits/108f144d6262d57d79903ba518d0b4f4b40f6d38v