From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJK40-00081r-97 for guix-patches@gnu.org; Mon, 27 Nov 2017 09:07:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJK3q-0005QI-PP for guix-patches@gnu.org; Mon, 27 Nov 2017 09:07:12 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:51548) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eJK3q-0005QE-Lz for guix-patches@gnu.org; Mon, 27 Nov 2017 09:07:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eJK3q-0002bd-Ce for guix-patches@gnu.org; Mon, 27 Nov 2017 09:07:02 -0500 Subject: [bug#29466] [PATCH] services: web: Add support for configuring the nginx server names hash. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20171127082338.18504-1-mail@cbaines.net> Date: Mon, 27 Nov 2017 15:06:48 +0100 In-Reply-To: <20171127082338.18504-1-mail@cbaines.net> (Christopher Baines's message of "Mon, 27 Nov 2017 08:23:38 +0000") Message-ID: <87zi77lssn.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: Christopher Baines Cc: 29466@debbugs.gnu.org Hi! Christopher Baines skribis: > The nginx service can fail to start if the server names hash bucket size = is > too small, which can happen on some systems, and when using QEMU, dependi= ng on > the CPU. > > * gnu/services/web.scm (): Add > server-names-hash-bucket-size and server-names-hash-bucket-max-size. > (default-nginx-config): Add support for the new hash bucket size parame= ters. > (nginx-service, nginx-activation): Pass the new hash bucket size parame= ters > through to the default-nginx-config procedure. > * doc/guix.texi (Web Services): Document the new hash bucket size paramet= ers. LGTM! However=E2=80=A6 > -(define (default-nginx-config nginx log-directory run-directory server-l= ist upstream-list) > +(define (default-nginx-config nginx log-directory run-directory server-l= ist > + upstream-list server-names-hash-bucket-size > + server-names-hash-bucket-max-size) That=E2=80=99s too many positional parameters. And should we use a gexp compiler for anyway? > (define nginx-shepherd-service > (match-lambda > (($ nginx log-directory run-directory server-b= locks > - upstream-blocks file) > + upstream-blocks server-names-hash-bucket-s= ize > + server-names-hash-bucket-max-size file) Likewise, at this stage, we should probably use =E2=80=98match-record=E2=80= =99 to avoid mistakes. Thanks, Ludo=E2=80=99.