[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#29466] [PATCH] services: web: Add support for configuring the nginx
From: |
Ludovic Courtès |
Subject: |
[bug#29466] [PATCH] services: web: Add support for configuring the nginx server names hash. |
Date: |
Mon, 27 Nov 2017 15:06:48 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hi!
Christopher Baines <address@hidden> 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, depending on
> the CPU.
>
> * gnu/services/web.scm (<nginx-configuration>): Add
> server-names-hash-bucket-size and server-names-hash-bucket-max-size.
> (default-nginx-config): Add support for the new hash bucket size parameters.
> (nginx-service, nginx-activation): Pass the new hash bucket size parameters
> through to the default-nginx-config procedure.
> * doc/guix.texi (Web Services): Document the new hash bucket size parameters.
LGTM!
However…
> -(define (default-nginx-config nginx log-directory run-directory server-list
> upstream-list)
> +(define (default-nginx-config nginx log-directory run-directory server-list
> + upstream-list server-names-hash-bucket-size
> + server-names-hash-bucket-max-size)
That’s too many positional parameters. And should we use a gexp
compiler for <nginx-configuration> anyway?
> (define nginx-shepherd-service
> (match-lambda
> (($ <nginx-configuration> nginx log-directory run-directory server-blocks
> - upstream-blocks file)
> + upstream-blocks server-names-hash-bucket-size
> + server-names-hash-bucket-max-size file)
Likewise, at this stage, we should probably use ‘match-record’ to avoid
mistakes.
Thanks,
Ludo’.