[DPE-7584] Fix temp tablespace directory permissions#10
Merged
marceloneppel merged 5 commits into16/edgefrom Sep 11, 2025
Merged
[DPE-7584] Fix temp tablespace directory permissions#10marceloneppel merged 5 commits into16/edgefrom
marceloneppel merged 5 commits into16/edgefrom
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>
2 tasks
dragomirp
reviewed
Sep 11, 2025
Comment on lines
+18
to
+20
| 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) |
Contributor
There was a problem hiding this comment.
We may need to tweak in the future for k8s compatibility.
dragomirp
approved these changes
Sep 11, 2025
taurus-forever
approved these changes
Sep 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
When using
tmpfsfor thetempstorage, 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
rootinstead of_daemon_and with permissions set to755instead 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