-
Bug
-
Resolution: Fixed
-
Major
-
4.2
-
MOODLE_402_STABLE
-
MOODLE_402_STABLE
-
- Simply, verify that the Travis (and GHA) badges in this issue are green (passed). It's displayed right above these testing instructions.
Recently (MDL-74905) we bumped Moodle 4.2 requirements to need PostgreSQL 13. One of the details changed there were Travis and GHA CI scripts to start using it.
It seems that the Travis script was having some (random) problems, failing at some point in the install phase.
Tracing down the problem, it seems that the service postgresql stop command (needed to prepare the ramdisk for the database), with PostgreSQL 13 is returning too early, when everything has not been shutdown/removed properly.
More specifically, we were getting this error in the logs:
mv: cannot remove '/var/lib/postgresql/13/main/postmaster.pid': No such file or directory
|
/var/run/postgresql:5432 - no response
|
Waiting for the DB to be up...
|
/var/run/postgresql:5432 - no response
|
Waiting for the DB to be up...
|
/var/run/postgresql:5432 - no response
|
Waiting for the DB to be up...
|
/var/run/postgresql:5432 - no response
|
...
|
...
|
(timeout after 2h)
|
Link to the failing run: https://app.travis-ci.com/github/stronk7/moodle/jobs/596855988
So, the postmaster.pid was still there, but was removed in the middle of the move (to ramdisk) operation, causing it to fail and, consequently, the service postgresql start command wasn't, ever', starting the database.
Note that this is only happening with 4.2dev (master) and PG13, we haven't seen it with previous Moodle and PG versions.
And the logic fix (that is being used out there by others), is to add a small sleep, to allow the service to be completely stopped (and pid file removed), before continue with the installation phase.
That's exactly what the proposed solution does. Note that, to keep everything similar. I've applied the very same pause to the mysql install phase (that doesn't run by default and, surely, doesn't need it). But better keep them parallel.
- will be (partly) resolved by
-
MDLSITE-7135 Remove Travis integration from Moodle core
-
- Closed
-