Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Restore pre-Tutor 16 behavior, disable the MySQL binlog by default
Up to Tutor 15, when Tutor was configured with `RUN_MYSQL: true`, it ran MySQL 5.7, which disabled binary logging ("the binlog") by default unless enabled with the `--log-bin` option. In Tutor 16, we switched to MySQL 8 which flipped this default: now, the binlog is enabled by default, unless disabled with `--skip-log-bin` or `--disable-log-bin`. The binlog is relevant for two purposes: 1. MySQL replication. 2. Point-in-time restore (that is, incrementally rolling forward from the most recently restored full backup, using binlog data). However, in case neither of those purposes are relevant to the Tutor deployment at hand (and it stands to reason that in most deployments they are not), enabling the binlog comes with disadvantages: * In busy Open edX databases, the binlog files can grow to considerable size, particularly considering the default expiry period for the binlog is a whopping 30 days. * This can cause a MySQL volume to fill up and then disable the database altogether, because it runs into `ENOSPC` ("no space left on device") errors. * This is especially true in `tutor k8s` configurations, where the MySQL volume size is just 5 GiB by default. Thus, restore the pre-Tutor 16 behavior of running without the binlog by default, and give users the opportunity to enable it by setting `MYSQL_ENABLE_BINLOG: true`. Reference: https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.html#option_mysqld_log-bin
- Loading branch information