[Nix-dev] Re: [Nix-commits] SVN commit: nix - 18556 - sandervanderburg - in nixos/branches/upstart-0.6/modules/services: databases web-servers

Nicolas Pierron nicolas.b.pierron at gmail.com
Mon Nov 23 14:46:08 CET 2009


Hi list,

On Mon, Nov 23, 2009 at 14:26, Sander van der Burg
<S.vanderBurg at tudelft.nl> wrote:
> Modified: nixos/branches/upstart-0.6/modules/services/databases/mysql.nix
> ===================================================================
> --- nixos/branches/upstart-0.6/modules/services/databases/mysql.nix     2009-11-23 12:48:54 UTC (rev 18555)
> +++ nixos/branches/upstart-0.6/modules/services/databases/mysql.nix     2009-11-23 13:26:33 UTC (rev 18556)
> @@ -83,7 +83,7 @@
>     jobs.mysql =
>       { description = "MySQL server";
>
> -        startOn = "started filesystems";
> +        startOn = "started network-interfaces";
>
>         preStart =
>           ''

I think you have just highlighted something which I consider as a problem.
Simple question: what if you need the network-interface to setup the
file system on which the MySQL data are stored?

This question is stupid based on the common usage of MySQL, but it
still exists for other services.  The current way allow the user to
override the startOn options from his configuration.nix, but a nicer
model would explicit the dependencies of the job and determines on
which resources the job should wait.

For example, you don't want to write:

  startOn = "whatever"

but you may prefer:

  waitFor = [ (readableDir "/var/data/mysql") ];

I think upstart can handle some of these, but NixOS can be used to
introduce a partial order of taks/jobs.

-- 
Nicolas Pierron
http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/
The Hitchhiker's Guide to the Galaxy - What do you get if you multiply
six by nine?



More information about the nix-dev mailing list