Skip to content
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

Fix mariadb config file permissions and restart pod on config change #78

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

olliewalsh
Copy link
Contributor

@olliewalsh olliewalsh commented Feb 20, 2023

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 20, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 20, 2023

[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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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.
@@ -4,7 +4,7 @@
{
"source": "/var/lib/config-data/galera.cnf",
"dest": "/etc/my.cnf.d/galera.cnf",
"owner": "root",
"owner": "mysql",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dciabrin is this also an issue for the galera controller?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@openshift-merge-robot
Copy link
Collaborator

PR needs rebase.

Instructions 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.

Copy link
Contributor

openshift-ci bot commented Jul 17, 2024

@olliewalsh: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/images 70a2d67 link true /test images
ci/prow/precommit-check 70a2d67 link true /test precommit-check
ci/prow/unit 70a2d67 link true /test unit
ci/prow/mariadb-operator-build-deploy-kuttl 70a2d67 link true /test mariadb-operator-build-deploy-kuttl
ci/prow/functional 70a2d67 link true /test functional

Full PR test history. Your PR dashboard.

Instructions 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants