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

Add mariadb-client MARIADB_MAX_ALLOWED_PACKET variable. #1375

merged 12 commits into from Feb 1, 2020


Copy link

steveworley commented Nov 5, 2019

The MySQL client also has a configuration value for max_allowed_packet and this can be different from the server (which in our case is 64M). This is currently using the default value of 16M. This causes issues when performing MySQL operations directly against the DB (PHP relies on the server configuration and is not subject to this problem), specifically mysqldump (drush sql-dump). If a row is inserted that is higher than the 16M default, the mysql client cannot retrieve the value.

Changelog Entry

Improvement - Allow client max_allowed_packet to be configured by an environment variable. (#1374 )

Closing issues

Closes #1374

Steve Worley
- Adds mariadb-client.cnf to the php-cli container.

Fixes #1374

This comment has been minimized.

Copy link

Schnitzel commented Nov 18, 2019

that's a great addition, thanks @steveworley

I don't think though this will work right now, as the file mariadb-client.cnf will end up with having ${MARIADB_MAX_ALLOWED_PACKET:-64M} inside the file. In order to do this correctly we need to envplate this file, here an example:

also we would need a documentation in here for this:

steveworley and others added 2 commits Dec 2, 2019
- Updates the documentation.
- Adds a envplate script.
- Modifies dockerfile to copy the script into the entrypoints.

This comment has been minimized.

Copy link

tobybellwood commented Dec 2, 2019

If there's no issue with the entrypoint ordering (I don't think so) - can we renumber this entrypoint to keep the amazeeio-provided entrypoints to <100 - just in case anyone else is adding entrypoints to our images downstream?

cli-drupal:/lagoon/entrypoints$ ls -a /lagoon/entrypoints | sort

This comment has been minimized.

Copy link
Contributor Author

steveworley commented Dec 2, 2019

Sure - I didn't know if there was a naming convention there and I looked through the mariadb image and it was using 200 for the envplate so I just assumed that would be okay.

images/php/cli/Dockerfile Outdated Show resolved Hide resolved
steveworley and others added 2 commits Dec 3, 2019
Co-Authored-By: Michael Schmid <>
Schnitzel added 2 commits Dec 3, 2019

This comment has been minimized.

Copy link

Schnitzel commented Dec 6, 2019

so this fails because the CLI pod cannot be started anymore:

jenkins@ax51-2:/home/michael.schmid$ oc logs -f pod/cli-1-swhkf
Agent pid 20
Identity added: /home/.ssh/key ((unnamed))
2019/12/06 17:18:50 [ ERROR ] Error while parsing '/etc/my.cnf.d/mariadb-server.cnf': open /etc/my.cnf.d/mariadb-server.cnf: permission denied

we need to run a fix-permissions after copying files into Dockerfiles that we want to envplate, an example:

can you add an

RUN fix-permissions /etc/my.cnf.d/

after you copied stuff into /etc/my.cnf.d/ inside the Dockerfile?

@Schnitzel Schnitzel modified the milestones: v1.2.0, v1.3.0 Dec 6, 2019
steveworley added 2 commits Jan 29, 2020
@Schnitzel Schnitzel merged commit 589d493 into amazeeio:master Feb 1, 2020
1 check passed
1 check passed
continuous-integration/jenkins/pr-merge This commit looks good
@tobybellwood tobybellwood changed the title Add mariadb-client configuraiton. Add mariadb-client MARIADB_MAX_ALLOWED_PACKET variable. Feb 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants
You can’t perform that action at this time.