diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2021-10-01 15:25:31 +0200 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2021-10-01 15:25:31 +0200 |
commit | 675e262f5a03eb9aa6b0500434ee30a9d6b882a0 (patch) | |
tree | d138d2b8062800e37a950daef797b6ec715c8808 /nixos/modules | |
parent | 49573709c5f842f0e3fbe4da3cd02f1c74aa9b1b (diff) | |
download | nixpkgs-675e262f5a03eb9aa6b0500434ee30a9d6b882a0.tar nixpkgs-675e262f5a03eb9aa6b0500434ee30a9d6b882a0.tar.gz nixpkgs-675e262f5a03eb9aa6b0500434ee30a9d6b882a0.tar.bz2 nixpkgs-675e262f5a03eb9aa6b0500434ee30a9d6b882a0.tar.lz nixpkgs-675e262f5a03eb9aa6b0500434ee30a9d6b882a0.tar.xz nixpkgs-675e262f5a03eb9aa6b0500434ee30a9d6b882a0.tar.zst nixpkgs-675e262f5a03eb9aa6b0500434ee30a9d6b882a0.zip |
nixos/nextcloud: temp fix for MariaDB >=10.6
The MariaDB version 10.6 doesn't seem supported with current Nextcloud versions and the test fails with the following error[1]: nextcloud # [ 14.950034] nextcloud-setup-start[1001]: Error while trying to initialise the database: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 4047 InnoDB refuses to write tables with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. According to a support-thread in upstream's Discourse[2] this is because of a missing support so far. Considering that we haven't received any bugreports so far - even though the issue already exists on master - and the workaround[3] appears to work fine, an evaluation warning for administrators should be sufficient. [1] https://hydra.nixos.org/build/155015223 [2] https://help.nextcloud.com/t/update-to-next-cloud-21-0-2-has-get-an-error/117028/15 [3] setting `innodb_read_only_compressed=0`
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/web-apps/nextcloud.nix | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index ba5f6582cbe..8f8d9cd0e26 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -399,13 +399,39 @@ in { The package can be upgraded by explicitly declaring the service-option `services.nextcloud.package`. ''; + + # FIXME(@Ma27) remove as soon as nextcloud properly supports + # mariadb >=10.6. + isUnsupportedMariadb = + # All currently supported Nextcloud versions are affected. + (versionOlder cfg.package.version "23") + # This module uses mysql + && (cfg.config.dbtype == "mysql") + # MySQL is managed via NixOS + && config.services.mysql.enable + # We're using MariaDB + && (getName config.services.mysql.package) == "mariadb-server" + # MariaDB is at least 10.6 and thus not supported + && (versionAtLeast (getVersion config.services.mysql.package) "10.6"); + in (optional (cfg.poolConfig != null) '' Using config.services.nextcloud.poolConfig is deprecated and will become unsupported in a future release. Please migrate your configuration to config.services.nextcloud.poolSettings. '') ++ (optional (versionOlder cfg.package.version "20") (upgradeWarning 19 "21.05")) ++ (optional (versionOlder cfg.package.version "21") (upgradeWarning 20 "21.05")) - ++ (optional (versionOlder cfg.package.version "22") (upgradeWarning 21 "21.11")); + ++ (optional (versionOlder cfg.package.version "22") (upgradeWarning 21 "21.11")) + ++ (optional isUnsupportedMariadb '' + You seem to be using MariaDB at an unsupported version (i.e. at least 10.6)! + Please note that this isn't supported officially by Nextcloud. You can either + + * Switch to `pkgs.mysql` + * Downgrade MariaDB to at least 10.5 + * Work around Nextcloud's problems by specifying `innodb_read_only_compressed=0` + + For further context, please read + https://help.nextcloud.com/t/update-to-next-cloud-21-0-2-has-get-an-error/117028/15 + ''); services.nextcloud.package = with pkgs; mkDefault ( |