The shipped mysql client on Debian 13 has `ssl=on` by default. So, on newer Debian and Ubuntu versions, we would need to add a configuration step for disabling SSL if you're not using it. I propose we disable it by default in `koha-mysql` as we are already setting `ssl=on` when SSL/TLS is properly configured in Koha (i.e. it is a change that will keep the current behavior, both of them).
Created attachment 188434 [details] [review] Bug 41099: Make `koha-mysql` disable SSL if required Now that Debian 13 (and Ubuntu 25.04) set `ssl=on` by default, we should make the `koha-mysql` helper script disable it by default if not configured. This patch does that. To test: 1. Run: $ ktd --shell k$ koha-mysql kohadev => SUCCESS: You get into the DB shell 2. Apply this patch 3. Run: k$ debian/scripts/koha-mysql kohadev => SUCCESS: It works as step 1! 4. Make sure you enable SSL in my.cnf: [client] ssl = on 5. Repeat 1 => FAIL: You get an error about SSL in the server being disabled 6. Repeat 4 => SUCCESS: The patch fixes it! 7. This steps imply we reproduced the issue, and it gets fixed, while keeping the current behavior. 8. Sign off :-D Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Now that Debian 13 (and Ubuntu 25.04) set `ssl=on` by default, we should make the `koha-mysql` helper script disable it by default if not configured. This patch does that. To test: 1. Run: $ ktd --shell k$ koha-mysql kohadev => SUCCESS: You get into the DB shell 2. Apply this patch 3. Run: k$ debian/scripts/koha-mysql kohadev => SUCCESS: It works as step 1! 4. Make sure you enable SSL in my.cnf: [client] ssl = on 5. Repeat 1 => FAIL: You get an error about SSL in the server being disabled 6. Repeat 4 => SUCCESS: The patch fixes it! 7. This steps imply we reproduced the issue, and it gets fixed, while keeping the current behavior. 8. Sign off :-D Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
For step 3 and 4 of the test plan, do I need to do anything else? I don't get an SSL failure error. Using KTD with Debian 12. Do I need to use a Debian 13 image?
Created attachment 188493 [details] [review] Bug 41099: Make `koha-mysql` disable SSL if required Now that Debian 13 (and Ubuntu 25.04) set `ssl=on` by default, we should make the `koha-mysql` helper script disable it by default if not configured. This patch does that. To test: 0. Start a Debian 13 KTD e.g. with: $ KOHA_IMAGE=main-trixie ktd up 1. Run: $ ktd --shell k$ koha-mysql kohadev => SUCCESS: You get into the DB shell 2. Apply this patch 3. Run: k$ debian/scripts/koha-mysql kohadev => SUCCESS: It works as step 1! 4. Make sure you enable SSL in my.cnf: [client] ssl = on 5. Repeat 1 => FAIL: You get an error about SSL in the server being disabled 6. Repeat 4 => SUCCESS: The patch fixes it! 7. This steps imply we reproduced the issue, and it gets fixed, while keeping the current behavior. 8. Sign off :-D Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
It works! (In reply to David Nind from comment #3) > Using KTD with Debian 12. Do I need to use a Debian 13 image? Yes, I amended the test plan to reflect this. Also, with MariaDB 12 (latest) the issue isn't reproducible. But with the default (10.5) it can be reproduced. So anyone else having trouble should also check that.
Created attachment 188495 [details] [review] Bug 41099: Make `koha-mysql` disable SSL if required Now that Debian 13 (and Ubuntu 25.04) set `ssl=on` by default, we should make the `koha-mysql` helper script disable it by default if not configured. This patch does that. To test: 0. Start a Debian 13 KTD e.g. with: $ KOHA_IMAGE=main-trixie ktd up 1. Run: $ ktd --shell k$ koha-mysql kohadev => SUCCESS: You get into the DB shell 2. Apply this patch 3. Run: k$ debian/scripts/koha-mysql kohadev => SUCCESS: It works as step 1! 4. Make sure you enable SSL in my.cnf: [client] ssl = on 5. Repeat 1 => FAIL: You get an error about SSL in the server being disabled 6. Repeat 4 => SUCCESS: The patch fixes it! 7. This steps imply we reproduced the issue, and it gets fixed, while keeping the current behavior. 8. Sign off :-D Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: David Nind <david@davidnind.com>
(In reply to Victor Grousset/tuxayo from comment #5) > It works! > > (In reply to David Nind from comment #3) > > Using KTD with Debian 12. Do I need to use a Debian 13 image? > > Yes, I amended the test plan to reflect this. > > > Also, with MariaDB 12 (latest) the issue isn't reproducible. But with the > default (10.5) it can be reproduced. So anyone else having trouble should > also check that. Thanks Victor! Using a Debian 13 image worked. I've added my sign off, so your sign off can probably be counted as QA. David
Thanks for the amended test plan. I wrote it without explicitly mentioning Debian 13 because the issue was reproducible by tweaking the mysql config. And by the time I submitted the main-trixie image was not tweaked to launch regardless of this fix. But it is great that we test on Debian 13. Once we push this patch, we can remove the workaround on KTD. Thanks everyone!