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

Make database character encoding configurable #172

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

dciabrin
Copy link
Contributor

When a MariaDBDatabase CR is reconciled, a database is created with a default character encoding and collation of latin1.

Instead of falling back to the server's default encoding for database creation, expose the encoding in the MariaDBDatabase CRD and default to utf8, as it expected by various Openstack projects.

When a MariaDBDatabase CR is reconciled, a database is created
with a default character encoding and collation of latin1.

Instead of falling back to the server's default encoding for
database creation, expose the encoding in the MariaDBDatabase CRD
and default to utf8, as it expected by various Openstack projects.
@dciabrin
Copy link
Contributor Author

/test mariadb-operator-build-deploy-kuttl

1 similar comment
@dciabrin
Copy link
Contributor Author

/test mariadb-operator-build-deploy-kuttl

@beagles
Copy link

beagles commented Nov 27, 2023

/lgtm

@beagles beagles closed this Nov 27, 2023
@beagles beagles reopened this Nov 27, 2023
@beagles
Copy link

beagles commented Nov 27, 2023

/lgtm

Copy link
Contributor

openshift-ci bot commented Nov 27, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: beagles, dciabrin

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

@dciabrin dciabrin requested a review from zzzeek November 27, 2023 14:22
@openshift-merge-bot openshift-merge-bot bot merged commit 343ccf4 into openstack-k8s-operators:main Nov 27, 2023
7 checks passed
@@ -35,11 +35,23 @@ spec:
spec:
description: MariaDBDatabaseSpec defines the desired state of MariaDBDatabase
properties:
defaultCharacterSet:
default: utf8
Copy link
Contributor

Choose a reason for hiding this comment

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

how come we went with utf8 and not utf8mb4 ? https://mariadb.com/kb/en/unicode/

kind: TestAssert
commands:
- script: |
oc rsh -n ${NAMESPACE} -c galera openstack-galera-0 /bin/sh -c 'mysql -uroot -p${DB_ROOT_PASSWORD} -Nse "select @@character_set_database;" kuttldb_latin1' | grep -o -w latin1
Copy link
Contributor

Choose a reason for hiding this comment

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

im doing some testing with kuttl now, using a similar file with commands/script, and I think the individual lines here that are doing "oc" + "grep" need to be separate "command" instances, since if the first grep finds nothing, the script keeps going and the return code is lost. ive confirmed the first line wont fail the test unless it's the only line.

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