NixOS / hydra

Hydra, the Nix-based continuous build system
http://nixos.org/hydra
GNU General Public License v3.0
1.17k stars 298 forks source link

hydra-init fails because: permission denied to create extension "pg_trgm" #660

Open basvandijk opened 5 years ago

basvandijk commented 5 years ago

@nlewo after upgrading hydra to the latest master (c85bf668e6868148c9a1adc4f9fe2b0f43ea66bc) I get the following error when starting hydra:

Jun 25 11:57:16 hydra systemd[1]: Starting hydra-init.service...
Jun 25 11:57:17 hydra hydra-init[19351]: upgrading Hydra schema from version 56 to 57
Jun 25 11:57:17 hydra hydra-init[19351]: executing SQL statement: CREATE EXTENSION pg_trgm
Jun 25 11:57:17 hydra hydra-init[19351]: schema upgrade failed: main::run_(): DBI Exception: DBD::Pg::db do failed: ERROR:  permission denied to create extension "pg_trgm"
Jun 25 11:57:17 hydra hydra-init[19351]: HINT:  Must be superuser to create this extension. at /nix/store/0mgikix3jzg1971yndzsjqqgzfjwbv75-hydra-0.1.2544.c85bf6/bin/.hydra-init-wrapped line 59
Jun 25 11:57:17 hydra systemd[1]: hydra-init.service: Main process exited, code=exited, status=255/n/a
Jun 25 11:57:17 hydra systemd[1]: hydra-init.service: Failed with result 'exit-code'.
Jun 25 11:57:17 hydra systemd[1]: Failed to start hydra-init.service.

I see the pg_trgm PostgreSQL extension was added in: https://github.com/NixOS/hydra/commit/7935cffd6b14a0861489c32ba091cff7f75d818a.

Does the hydra NixOS module need to be updated to make this work?

edolstra commented 5 years ago

Yes, see #657.

basvandijk commented 5 years ago

Thanks! I think that PR will fix my problem.

nlewo commented 5 years ago

@basvandijk sorry for this issue:( Let me know if you still have issues with PR #657.