Fix mariadb config file permissions and restart pod on config change#78
Fix mariadb config file permissions and restart pod on config change#78olliewalsh wants to merge 2 commits intoopenstack-k8s-operators:mainfrom
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: olliewalsh The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Mariadb is using default conf as the conf file is not readable by the mysql user. Also pass the config hash as an env to the pod to ensure it is recreated when the config changes.
2951a48 to
23f580d
Compare
| "source": "/var/lib/config-data/galera.cnf", | ||
| "dest": "/etc/my.cnf.d/galera.cnf", | ||
| "owner": "root", | ||
| "owner": "mysql", |
There was a problem hiding this comment.
@dciabrin is this also an issue for the galera controller?
There was a problem hiding this comment.
Yes the galera pod is started as root as well and mysqld switches to user mysql, so the owner of this file is still root.
There was a problem hiding this comment.
Heads up, in TripleO all files under /etc/my.cnf.d are owned by root, and this config is also owned by root with perms 644.
I think this is what we want here as well, and I did the same for the galera CR.
CreateOrUpdate was used initially, now using CreateOrPatch
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@olliewalsh: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Mariadb is using default conf as the conf file is not readable by the mysql user. Also pass the config hash as an env to the pod to ensure it is recreated when the config changes.