[Nix-dev] [Nix-commits] SVN commit: nix - r32762 - nixos/trunk/modules/system/upstart

Eelco Dolstra eelco.dolstra at logicblox.com
Sun Mar 4 15:18:52 CET 2012


Hi,

On 04/03/12 15:12, Mathijs Kwik wrote:

>>> upstart: options for setuid and setgid
>>> as jobs running as different users cannot create their logfile, I moved that to an activationScript
>>
>> These options cannot be used right away because they won't work with previous
>> Upstart versions, i.e., they require a reboot.  So please don't use them.
> 
> So when can we use them?

In a few months or so.  (It doesn't really matter though for jobs like MongoDB.)

> Is there a way to specify "this change requires a reboot" ?

Yes, our Upstart expression has an interface version that can be used for that:

  # The interface version prevents NixOS from switching to an
  # incompatible Upstart at runtime.  (Switching across reboots is
  # fine, of course.)  It should be increased whenever Upstart changes
  # in a backwards-incompatible way.  If the interface version of two
  # Upstart builds is the same, then we can switch between them at
  # runtime; otherwise we can't and we need to reboot.
  passthru.interfaceVersion = 2;

But I'd rather not use it because it forces everybody to reboot.  So I wouldn't
be able to do a "nixos-rebuild switch" on a production server anymore.

It's really unfortunate that we can't upgrade Upstart in a running system.
Upstart 0.3 had a nice feature that it could re-exec itself to perform upgrades.
 But that got dropped somewhere.

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/


More information about the nix-dev mailing list