Skip to content

Bump to SQL*Server 15 (2019) CU32 (ubuntu 20.04) #22

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

scara
Copy link
Contributor

@scara scara commented Apr 14, 2025

Bump CU to avoid startup crash on Ubuntu 24.04: CU26+ will start fine on both Ubuntu 22.04 and Ubuntu 24.04.

Changes due to latest SQL*Server 15 (2019) CU32:

  1. The path /opt/mssql-tools/bin/sqlcmd changed to /opt/mssql-tools18/bin/sqlcmd.
  2. Adds -C to trust the server certificate.
  3. Disable SQL Server forcing all connections to be encrypted.

Refs:

Fixes #21.

Bump CU to avoid startup crash on Ubuntu 24.04: CU26+ will start fine on
both Ubuntu 22.04 and Ubuntu 24.04.

Changes due to latest SQL*Server 15 (2019) CU32:
1. The path `/opt/mssql-tools/bin/sqlcmd` changed to `/opt/mssql-tools18/bin/sqlcmd`.
2. Adds `-C` to trust the server certificate.
3. Disable SQL Server forcing all connections to be encrypted.

Refs:
- https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-configure-mssql-conf?view=sql-server-ver15#specify-tls-settings

Fixes moodlehq#21.
@scara
Copy link
Contributor Author

scara commented Apr 14, 2025

Tested sampling some unit tests:

  1. Prepare the lab:
$ git clone https://github.com/scara/moodle-db-mssql
$ cd ./moodle-db-mssql
$ git checkout 21-Bump-CU-To-Avoid-Startup-Crash-On-Ubuntu-24d04
$ docker build -t moodle-db-mssql .
$ cd ..
$ curl -O https://packaging.moodle.org/stable500/moodle-5.0.tgz
$ tar zxf moodle-5.0.tgz
$ git clone https://github.com/moodlehq/moodle-docker
$ export MOODLE_DOCKER_WWWROOT=$(pwd)/moodle
$ export MOODLE_DOCKER_DB=mssql
$ cd moodle-docker
$ cp config.docker-template.php $MOODLE_DOCKER_WWWROOT/config.php
  1. Configure the dev environment to use the just built image:
$ sed -i 's/moodlehq\/moodle-db-mssql/moodle-db-mssql/g' db.mssql.yml
$ bin/moodle-docker-compose up -d
$ bin/moodle-docker-wait-for-db
  1. Run some tests:
$ bin/moodle-docker-compose exec webserver php admin/tool/phpunit/cli/init.php
$ bin/moodle-docker-compose exec webserver vendor/bin/phpunit lib/ddl/tests/ddl_test.php
$ bin/moodle-docker-compose exec webserver vendor/bin/phpunit lib/dml/tests/sqlsrv_native_moodle_database_test.php
  1. Shutdown the dev environment:
$ bin/moodle-docker-compose down -v

HTH,
Matteo

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

Successfully merging this pull request may close these issues.

Bump CU (CU26+) to avoid startup crash on Ubuntu 24.04
1 participant