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
Set postgres db owner to confluence user. #54
Conversation
Basically making the database be owned by the user accessing it, which gets around some edge-cases with importing/exporting where the confluence db user can't manage the database properly |
Does the
|
Ah, had never noticed that resource attr before :) thanks |
f1e07a8
to
7fc6460
Compare
Force pushed to take your suggestion into account @bflad |
Hm. Except it might create a chicken and egg situation with the user, which we create second. We'll probably need to separate out the user :create from the user :grant if we want to get around that. Any objections? |
(Not ready to be merged until the above comment is dealt with, to clarify) |
@patcon Could you please give an example - what problem does this pull request solve? |
Sure! Before this, the database was owned by Basically, it seems that it was an oversight that the database wasn't owned by the |
@patcon Thank you! Now it's clear for me :) But yes, this PR should be modified, because user should be already created when we try to create a DB. Otherwise, there will be an error like this:
|
👍 :) |
7fc6460
to
ec60121
Compare
* PostgreSQL has database ownership that can be used instead of grants. Previously, the `confluence` user only had table-level ownership. (This change allows a database to be imported using a more flexible backup, taken with the `--no-owner` flag.)
ec60121
to
53b91bb
Compare
ok, this should be good now, but I haven't tested it yet, so I'll have to do that later Also, I realized by consulting the docs that postgres didn't need grants if the user owns the database, and mysql doesn't have table ownership -- only grants (it's a no-op resource attr in the |
@patcon It works fine, thank you! |
Set postgres db owner to confluence user.
* master: (27 commits) Run integration tests in Travis with Docker .kitchen.yml: Remove "ubuntu-15.04" platform support Add fixture cookbook Use ChefDK for running Rake tasks and Travis jobs Update contribution and testing guidelines according to Chef Software conventions test/integration: Use "infrataster" to check website availability Converted virtualhost derived attrs into helper functions. [#81] Add support of Confluence 5.8.16 spec/database_spec: Fix data bag item Add spec for "database" recipe Add apt cookbook for test-kitchen success on DO. Allow helpers to be used within resource. Fixed rubocop errors. Removed redundant var. Added database connection helper. Set postgres db owner, and remove :grant action. [#54] Mark 'java' cookbook as a dependency Update README.md Allow to override SSO settings in the data bag Fix README.md Use common method "data_bag_item" for item loading ...
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
taken with the
--no-owner
flag. However, in order for the newdatabase to work as expected, the database my be owned by the user
expected to interact with it. This way, the table ownership is
automatically set to this db user during import, and this db user can
continue to access later.