Skip to content
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

nixos/mysql: fix service so it works with mysql80 package #83042

Merged
merged 2 commits into from Mar 23, 2020

Conversation

aanderse
Copy link
Member

Motivation for this change

services.mysql is broken with .package = pkgs.mysql80;

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@aanderse
Copy link
Member Author

aanderse commented Mar 21, 2020

@GrahamcOfBorg test mysql

@aanderse
Copy link
Member Author

If I run the mysql service with mysql80 locally on NixOS 20.03-beta everything works fine, but running the test seems to fault out... @orivej-nixos @orivej as the maintainer of mysql80 do you have any ideas? Are you running mysql80 at all? Presumably not with the NixOS service because it is broken...

@orivej
Copy link
Contributor

orivej commented Mar 21, 2020

Personally I don't run mysqld service.

With your PR mysql80 test fails with the out of memory kernel panic. This can be fixed by adding virtualisation.memorySize = 1024; after services.mysql.package = pkgs.mysql80; in the test.

@aanderse
Copy link
Member Author

@orivej thanks! You do use the mysql80 package though... right?

@orivej
Copy link
Contributor

orivej commented Mar 22, 2020

Yes, but currently only for its client.

@orivej-nixos orivej-nixos merged commit aa049c8 into NixOS:master Mar 23, 2020
@aanderse aanderse deleted the mysql-fixup branch March 23, 2020 17:17
@Izorkin
Copy link
Contributor

Izorkin commented Mar 23, 2020

@aanderse error rebuild system

building Nix...
building the system configuration...
error: while evaluating the attribute 'config.system.build.toplevel' at /home/user/works/src-nix/nixpkgs/nixos/modules/system/activation/top-level.nix:275:5:
while evaluating 'foldr' at /home/user/works/src-nix/nixpkgs/lib/lists.nix:52:20, called from /home/user/works/src-nix/nixpkgs/nixos/modules/system/activation/top-level.nix:139:12:
while evaluating 'fold'' at /home/user/works/src-nix/nixpkgs/lib/lists.nix:55:15, called from /home/user/works/src-nix/nixpkgs/lib/lists.nix:59:8:
while evaluating 'showWarnings' at /home/user/works/src-nix/nixpkgs/lib/trivial.nix:302:28, called from /home/user/works/src-nix/nixpkgs/nixos/modules/system/activation/top-level.nix:136:10:
while evaluating 'foldr' at /home/user/works/src-nix/nixpkgs/lib/lists.nix:52:20, called from /home/user/works/src-nix/nixpkgs/lib/trivial.nix:302:33:
while evaluating 'fold'' at /home/user/works/src-nix/nixpkgs/lib/lists.nix:55:15, called from /home/user/works/src-nix/nixpkgs/lib/lists.nix:59:8:
while evaluating the attribute 'warnings' at undefined position:
while evaluating anonymous function at /home/user/works/src-nix/nixpkgs/lib/modules.nix:84:45, called from undefined position:
while evaluating the attribute 'value' at /home/user/works/src-nix/nixpkgs/lib/modules.nix:383:9:
while evaluating the option `warnings':
while evaluating the attribute 'mergedValue' at /home/user/works/src-nix/nixpkgs/lib/modules.nix:415:5:
while evaluating the attribute 'values' at /home/user/works/src-nix/nixpkgs/lib/modules.nix:409:9:
while evaluating the attribute 'values' at /home/user/works/src-nix/nixpkgs/lib/modules.nix:508:7:
while evaluating anonymous function at /home/user/works/src-nix/nixpkgs/lib/modules.nix:395:28, called from /home/user/works/src-nix/nixpkgs/lib/modules.nix:395:17:
while evaluating definitions from `/home/user/works/src-nix/nixpkgs/nixos/modules/system/boot/systemd.nix':
while evaluating 'dischargeProperties' at /home/user/works/src-nix/nixpkgs/lib/modules.nix:467:25, called from /home/user/works/src-nix/nixpkgs/lib/modules.nix:396:137:
while evaluating the attribute 'value' at /home/user/works/src-nix/nixpkgs/lib/modules.nix:281:44:
while evaluating anonymous function at /home/user/works/src-nix/nixpkgs/lib/attrsets.nix:234:10, called from undefined position:
while evaluating anonymous function at /home/user/works/src-nix/nixpkgs/nixos/modules/system/boot/systemd.nix:808:51, called from /home/user/works/src-nix/nixpkgs/lib/attrsets.nix:234:16:
while evaluating 'optional' at /home/user/works/src-nix/nixpkgs/lib/lists.nix:254:20, called from /home/user/works/src-nix/nixpkgs/nixos/modules/system/boot/systemd.nix:809:7:
while evaluating the attribute 'serviceConfig.Type' at undefined position:
while evaluating anonymous function at /home/user/works/src-nix/nixpkgs/lib/modules.nix:84:45, called from undefined position:
while evaluating the attribute 'value' at /home/user/works/src-nix/nixpkgs/lib/modules.nix:383:9:
while evaluating the option `systemd.services.mysql.serviceConfig':
while evaluating the attribute 'mergedValue' at /home/user/works/src-nix/nixpkgs/lib/modules.nix:415:5:
while evaluating the attribute 'values' at /home/user/works/src-nix/nixpkgs/lib/modules.nix:409:9:
while evaluating the attribute 'values' at /home/user/works/src-nix/nixpkgs/lib/modules.nix:508:7:
while evaluating anonymous function at /home/user/works/src-nix/nixpkgs/lib/modules.nix:395:28, called from /home/user/works/src-nix/nixpkgs/lib/modules.nix:395:17:
while evaluating definitions from `/home/user/works/src-nix/nixpkgs/nixos/modules/system/boot/systemd.nix':
while evaluating 'dischargeProperties' at /home/user/works/src-nix/nixpkgs/lib/modules.nix:467:25, called from /home/user/works/src-nix/nixpkgs/lib/modules.nix:396:137:
while evaluating the attribute 'condition' at /home/user/works/src-nix/nixpkgs/lib/modules.nix:552:14:
while evaluating the attribute 'condition' at /home/user/works/src-nix/nixpkgs/lib/modules.nix:552:14:
while evaluating the attribute 'preStart' at undefined position:
while evaluating anonymous function at /home/user/works/src-nix/nixpkgs/lib/modules.nix:84:45, called from undefined position:
while evaluating the attribute 'value' at /home/user/works/src-nix/nixpkgs/lib/modules.nix:383:9:
while evaluating the option `systemd.services.mysql.preStart':
while evaluating the attribute 'mergedValue' at /home/user/works/src-nix/nixpkgs/lib/modules.nix:415:5:
while evaluating the attribute 'values' at /home/user/works/src-nix/nixpkgs/lib/modules.nix:409:9:
while evaluating the attribute 'values' at /home/user/works/src-nix/nixpkgs/lib/modules.nix:508:7:
while evaluating anonymous function at /home/user/works/src-nix/nixpkgs/lib/modules.nix:395:28, called from /home/user/works/src-nix/nixpkgs/lib/modules.nix:395:17:
while evaluating definitions from `/home/user/works/src-nix/nixpkgs/nixos/modules/services/databases/mysql.nix':
while evaluating 'dischargeProperties' at /home/user/works/src-nix/nixpkgs/lib/modules.nix:467:25, called from /home/user/works/src-nix/nixpkgs/lib/modules.nix:396:137:
while evaluating the attribute 'value' at /home/user/works/src-nix/nixpkgs/lib/modules.nix:281:44:
while evaluating 'getName' at /home/user/works/src-nix/nixpkgs/lib/strings.nix:485:13, called from /home/user/works/src-nix/nixpkgs/nixos/modules/services/databases/mysql.nix:11:36:
while evaluating 'parse' at /home/user/works/src-nix/nixpkgs/lib/strings.nix:487:14, called from /home/user/works/src-nix/nixpkgs/lib/strings.nix:490:24:
attribute 'name' missing, at /home/user/works/src-nix/nixpkgs/lib/strings.nix:490:30

@Izorkin
Copy link
Contributor

Izorkin commented Mar 23, 2020

Me used this override

  nixpkgs.config.packageOverrides = with lib; pkgs: rec {
    # Nix User Repository
    nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") { inherit pkgs; };

    mariadb.client = nur.repos.izorkin.mariadb_10_3.client;
    mariadb.server = nur.repos.izorkin.mariadb_10_3.server;
  };

@flokli
Copy link
Contributor

flokli commented Mar 23, 2020 via email

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

Successfully merging this pull request may close these issues.

None yet

5 participants