[Nix-dev] Using Nixpkgs outside of NixOS

Kirill Elagin kirelagin at gmail.com
Wed Jun 4 10:12:54 CEST 2014


Hm, I wasn't following the kernel ml on this, but from the systemd's
document it follows that there has to be _exactly one_ writer to this
filesystem and this is a restriction forced by the kernel. systemd's
decision is that it will be PID 1, not some other process. On non-systemd
systems that can be some other root process, not necessarily PID 1, but
only one.


--
Кирилл Елагин


On Wed, Jun 4, 2014 at 11:53 AM, Michael Raskin <7c6f434c at mail.ru> wrote:

> >too bad :-) Thanks for the find!
>
> By the way, note that PID-1-only cgroups management is a systemd
> decision, as far as I understand from the kernel mailing list posts, the
> interface will still be a filesystem, and apparently it is OK to
> implement cgroup management by multiple root processes (i.e. not
> a migration to a single open socket).
>
> >
> >On Wed, Jun 4, 2014 at 8:14 AM, Kirill Elagin <kirelagin at gmail.com>
> wrote:
> >
> >> http://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/
> >>
> >> http://cgit.freedesktop.org/systemd/systemd/tree/src/core/main.c#n1469
> >>
> >>
> >> --
> >> Кирилл Елагин
> >>
> >>
> >> On Wed, Jun 4, 2014 at 1:21 AM, Wout Mertens <wout.mertens at gmail.com>
> >> wrote:
> >>
> >>> On Tue, Jun 3, 2014 at 8:30 PM, Kirill Elagin <kirelagin at gmail.com>
> >>> wrote:
> >>>
> >>>>  Obviously systemd would then have to not do things that udev etc are
> >>>>> already doing... Just running services, opening sockets, handling
> cgroups...
> >>>>>
> >>>>
> >>>> I doubt systemd can do this.
> >>>> First of all, with the new kernel cgroups interface only PID 1 can
> >>>> manage cgroups (on the kernel level).
> >>>> Then, to properly handle services (i.e. processes) systemd has to be
> PID
> >>>> 1, right? Because otherwise it won't be able to track dead processes
> and
> >>>> all this stuff.
> >>>>
> >>>
> >>> Are you sure about PID 1? I can't find that in
> >>> https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt
> >>>
> >>> I'm thinking systemd can run in user-mode, even if it's running as
> root.
> >>> It's automatically turned on when it's not PID 1, I need to try it.
> >>>
> >>> Wout.
> >>>
> >>
> >>
> >
> >--047d7b414174e5bf6404fafd5f90
> >Content-Type: text/html; charset=UTF-8
> >Content-Transfer-Encoding: 8bit
> >X-MIME-Autoconverted: from quoted-printable to 8bit by 401a0bf1 id
> mimedecode.py
> >
> ><div dir="ltr">too bad :-) Thanks for the find!</div><div
> class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 4, 2014 at
> 8:14 AM, Kirill Elagin <span dir="ltr">&lt;<a href="mailto:
> kirelagin at gmail.com" target="_blank">kirelagin at gmail.com</a>&gt;</span>
> wrote:<br>
> ><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px
> #ccc solid;padding-left:1ex"><div dir="ltr"><a href="
> http://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/"
> target="_blank">
> http://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/
> </a><br>
> ><br><a href="
> http://cgit.freedesktop.org/systemd/systemd/tree/src/core/main.c#n1469"
> target="_blank">
> http://cgit.freedesktop.org/systemd/systemd/tree/src/core/main.c#n1469
> </a><br>
> >
> ></div><div class="gmail_extra"><br clear="all"><div><div
> dir="ltr"><div><br></div>--<br>Кирилл Елагин</div></div><div><div
> class="h5">
> ><br><br><div class="gmail_quote">On Wed, Jun 4, 2014 at 1:21 AM, Wout
> Mertens <span dir="ltr">&lt;<a href="mailto:wout.mertens at gmail.com"
> target="_blank">wout.mertens at gmail.com</a>&gt;</span>
> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0
> .8ex;border-left:1px #ccc solid;padding-left:1ex">
> >
> >
> ><div dir="ltr"><div><div><div class="gmail_extra"><div
> class="gmail_quote">On Tue, Jun 3, 2014 at 8:30 PM, Kirill Elagin <span
> dir="ltr">&lt;<a href="mailto:kirelagin at gmail.com" target="_blank">
> kirelagin at gmail.com</a>&gt;</span> wrote:<br>
> >
> >
> >
> ><blockquote class="gmail_quote" style="margin:0px 0px 0px
> 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div
> dir="ltr"><div class="gmail_extra"><div><div class="gmail_quote">
> >
> >
> >
> ><blockquote class="gmail_quote" style="margin:0px 0px 0px
> 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div
> dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
> >
> >
> >
> >
> >
> ><div class="gmail_extra">Obviously systemd would then have to not do
> things that udev etc are already doing... Just running services, opening
> sockets, handling
> cgroups...</div></div></div></div></blockquote></div><br></div>
> >
> >
> >
> >I doubt systemd can do this.<br>
> >
> >First of all, with the new kernel cgroups interface only PID 1 can manage
> cgroups (on the kernel level).<br>Then, to properly handle services (i.e.
> processes) systemd has to be PID 1, right? Because otherwise it won&#39;t
> be able to track dead processes and all this stuff.<br>
> >
> >
> >
> >
> >
> ></div></div>
> ></blockquote></div><br></div></div></div><div class="gmail_extra">Are you
> sure about PID 1? I can&#39;t find that in <a href="
> https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt"
> target="_blank">
> https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt</a></div>
> >
> >
> >
> ><div class="gmail_extra"><br></div><div class="gmail_extra">I&#39;m
> thinking systemd can run in user-mode, even if it&#39;s running as root.
> It&#39;s automatically turned on when it&#39;s not PID 1, I need to try
> it.</div>
> >
> >
> ><span><font color="#888888">
> ><div class="gmail_extra"><br></div><div
> class="gmail_extra">Wout.</div></font></span></div>
> ></blockquote></div><br></div></div></div>
> ></blockquote></div><br></div>
> >
> >--047d7b414174e5bf6404fafd5f90--
> >
> >--===============1597797028==
> >Content-Transfer-Encoding: 7bit
> >Content-Disposition: inline
> >MIME-Version: 1.0
> >Content-Type: text/plain; charset="utf-8"
> >X-MIME-Autoconverted: from us-ascii to utf-8 by 401a0bf1 id mimedecode.py
> >
> >_______________________________________________
> >nix-dev mailing list
> >nix-dev at lists.science.uu.nl
> >http://lists.science.uu.nl/mailman/listinfo/nix-dev
> >
> >--===============1597797028==--
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20140604/7a7b8789/attachment.html 


More information about the nix-dev mailing list