[Nix-dev] Hydra on NixOS
Peter Simons
simons at cryp.to
Sun Aug 10 14:04:10 CEST 2014
Hi Mateusz,
> ExecStartPre=/nix/store/zlsf8wn19rl5qhs27lr5cs08xx718vdx-unit-script/bin/hydra-init-pre-start (code=exited, status=1/FAILURE)
>
> Aug 10 09:23:33 lenalee hydra-init-pre-start[6714]: createuser: creation
> of new role failed: ERROR: role "hydra" already exists
> Aug 10 09:23:33 lenalee systemd[1]: hydra-init.service: control process
> exited, code=exited status=1
> Aug 10 09:23:33 lenalee systemd[1]: Failed to start hydra-init.service.
> Aug 10 09:23:33 lenalee systemd[1]: Unit hydra-init.service entered
> failed state.
on my machine, the hydra-init-pre-start script looks like this:
| #! /nix/store/ihmkc7z2wqk3bbipfnlh0yjrlfkkgnv6-bash-4.2-p45/bin/bash -e
| mkdir -m 0700 -p /var/lib/hydra/data
| chown hydra /var/lib/hydra/data
| ln -sf /nix/store/9nf5dyx4r6adlsy3dvfml859vjq6izlx-hydra.conf /var/lib/hydra/data/hydra.conf
| if ! [ -e /var/lib/hydra/.db-created ]; then
| /nix/store/m9dsdaxix24zsf5fs9wpi04i74dpl6rl-postgresql-9.2.8/bin/createuser hydra
| /nix/store/m9dsdaxix24zsf5fs9wpi04i74dpl6rl-postgresql-9.2.8/bin/createdb -O hydra hydra
| touch /var/lib/hydra/.db-created
| fi
Now, it appears that your machine has a properly initialized Postgres
database, but it doesn't have the file /var/lib/hydra/.db-created. To
remedy that, you can either create that file, or you can wipe the
Postgres database for hydra. The first solution seems easier to me. :-)
I hope this helps!
Peter
More information about the nix-dev
mailing list