-
Notifications
You must be signed in to change notification settings - Fork 1
[DPE-7584] Fix temp tablespace directory permissions #10
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
Conversation
Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
…ssions Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com> # Conflicts: # tests/unit/test_postgresql.py
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (45.45%) is below the target coverage (70.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## 16/edge #10 +/- ##
===========================================
+ Coverage 40.64% 45.45% +4.81%
===========================================
Files 3 4 +1
Lines 780 792 +12
Branches 92 92
===========================================
+ Hits 317 360 +43
+ Misses 448 414 -34
- Partials 15 18 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
user_database = pwd.getpwnam(SNAP_USER) | ||
# Set the correct ownership for the file or directory. | ||
os.chown(path, uid=user_database.pw_uid, gid=user_database.pw_gid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may need to tweak in the future for k8s compatibility.
Issue
When using
tmpfs
for thetemp
storage, if we reboot the host machine, and later, after the charm starts again, it's not possible to create temporary objects, like temporary tables.The reason is that after the reboot, the storage is mounted with wrong ownership and permissions (owned by
root
instead of_daemon_
and with permissions set to755
instead of700
).Solution
Fix the permissions when the charm starts again.
Follow-up PRs will be created to import this new version of the lib in the charms and also make the permissions of the directories consistent (700 everywhere).
The library version was bumped to 16.0.0 to later allow the possibility of having the 14.0.0 version being used by the PostgreSQL 14 charms common code.
Checklist