From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGB1F-0007Gf-AO for guix-patches@gnu.org; Wed, 31 May 2017 17:19:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dGB1C-00058v-5s for guix-patches@gnu.org; Wed, 31 May 2017 17:19:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:45335) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dGB1C-00058r-1X for guix-patches@gnu.org; Wed, 31 May 2017 17:19:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dGB1B-0000qA-Py for guix-patches@gnu.org; Wed, 31 May 2017 17:19:01 -0400 Subject: bug#26829: Add knot service Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170508172223.7fbc9705@lepiller.eu> <20170527104145.2d8b6867@lepiller.eu> <8737bosx69.fsf@gnu.org> <92fb9449ec88661f0fb9d43664792ffa@lepiller.eu> <87lgpf7h8e.fsf@gnu.org> <20170531214139.41779e0e@lepiller.eu> Date: Wed, 31 May 2017 23:17:56 +0200 In-Reply-To: <20170531214139.41779e0e@lepiller.eu> (Julien Lepiller's message of "Wed, 31 May 2017 21:41:39 +0200") Message-ID: <87vaog7mkb.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Julien Lepiller Cc: 26829@debbugs.gnu.org Julien Lepiller skribis: > Le Mon, 29 May 2017 18:36:17 +0200, > ludo@gnu.org (Ludovic Court=C3=A8s) a =C3=A9crit : > >> Hello, >>=20 >> julien lepiller skribis: >>=20 >> > Le 2017-05-28 19:34, ludo@gnu.org a =C3=A9crit=C2=A0:=20=20 >> >> Hi Julien, >> >> >> >> Julien Lepiller skribis: >> >>=20=20 >> >>> So, pushed as ba69e8f7ce21a81bdd5b99fdb1cc64492443e15c.=20=20 >> >> >> >> Very nice and very useful notably for self-hosting use cases!=20=20 >> > That's exactly why I did that :). I'm currently self-hosting my >> > services on debian, and I would like to move to guixSD at some >> > point, so I'm writing services I need.=20=20 >>=20 >> Excellent. :-) >>=20 >> >> I have two minor comments: >> >> >> >> 1. What it would it take to write tests for this? I assume we >> >> could simply make DNS requests locally?=20=20 >> > I have never written a system test, so I don't know how it works. If >> > we check only that requests are answered correctly locally, I think >> > that would be great but limited to the "master" scenario. Then there >> > is the "slave" scenario, where we would need a zone transfer between >> > two hosts. And we could also check that transfer occurs only to >> > authorized slaves.=20=20 >>=20 >> OK. I guess I know too little about DNS to make any useful comment. >>=20 >> >> 2. For things like: >> >> >> >> +@item @code{nsec3-salt-lifetime} (default: @code{"30d"}) >> >> >> >> I prefer using an integer denoting the number of seconds, and >> >> then letting users do the multiplication or use (string->duration >> >> "30d"). >> >> I did that for =E2=80=98guix-publish-service=E2=80=99.=20=20 >> > I didn't know it existed, but it looks nicer indeed. I'll see what I >> > can do.=20=20 >>=20 >> OK! Note that I=E2=80=99m not saying that the service code should use >> =E2=80=98string->duration=E2=80=99 directly, but rather that the service= code should >> use integers to represent duration (in seconds). > So, the default value would be (string->duration "30d"), which is a > number of second, and the configuration should use this number of > seconds, right? No, the (gnu services =E2=80=A6) modules should not depend on (guix ui), wh= ich is mostly for the CLI. So the default value would be (* 30 24 3600). We could (define hour 3600) (define day (* 24 hour)) etc. Ludo=E2=80=99.