[MISC] 8.4 - Cleanup K8s legacy permissions fix#167
[MISC] 8.4 - Cleanup K8s legacy permissions fix#167sinclert-canonical wants to merge 1 commit into8.4/edgefrom
Conversation
|
I'm confused. The changes in the MySQL rock predate canonical/mysql-k8s-operator#238 by a few months 🤔 |
Yes, let me figure out why. Worst case, we make changes to the charmed rock first, then bump the rock SHA-256 to point at the upcoming rock, alongside this cleanup. |
Spent a bit of time figuring out what was wrong: In fact, the bug described in the removed function doc-string is still there: when initializing the MySQL data directory within the charm, the Therefore, in order to prevent a regression in the charm behavior when initializing the MySQL data directory, such directory needs to be created + changed ownership in the rock. I tested this approach in this PR, and apparently MySQL can initialize the data directory, even if it already exists, as long as it is completely empty. I will update the PR description accordingly. |
This PR removes an old MySQL data directory permissions fix, reverting this old PR.
As far as I understand, we are already setting the permissions in the charmed MySQL rock (see code), but the
/var/lib/mysqlfolder does not exist yet. To that end, I am proposing to explicitly create such folder before the ownership change takes place (see PR). This will need to be updated, pointing at the new image SHA.Required for MySQL K8s charm in root-less mode.