all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: EuAndreh via Guix-patches via <guix-patches@gnu.org>
To: Christopher Baines <mail@cbaines.net>
Cc: 58405@debbugs.gnu.org
Subject: [bug#58405] [PATCH] services: nginx: Add reload action
Date: Wed, 12 Oct 2022 04:00:46 -0300	[thread overview]
Message-ID: <166555804644.2805.1693234721157753050@localhost> (raw)
In-Reply-To: <87h70aaay0.fsf@cbaines.net>

> With the NGinx service currently, you need to restart it to change the
> NGinx binary or configuration file.

It is true that you need to restart to change the NGINX binary, but this
is not true for changing the configuration file.

NGINX's master process reloads the configuration file, which could have
an "include" line that points to ad-hoc files in /etc.  So even though
the NGINX service is using the immutable file inside /gnu/store,
reloading it can have it change its runtime behaviour.

The same behaviour is relied upon for certbot certificates: the current
certificate lives in /etc/letsencrypt/live, but it is a symlink that
points to /etc/letsencrypt/archive.  When a certificate is renewed, a
SIGHUP ought to be sent to NGINX in order to reload the configuration
file, so that the certificates themselves can be reloaded, even though
neither the NGINX binary nor the configuration file changed, but only
what they point to did.


> What's the purpose of the reload action here given that neither the
> binary or configuration file being used will change?

I'm doing blue/green deployments on a web service.  I have the
equivalent of /etc/my-service/{blue,green,active}.conf files, and an
"include" line in the main NGINX configuration that includes the
"active" one.  Doing a deploy from blue to green is done by changing the
`active.conf` symlink to point to `green.conf` instead, and sending a
SIGHUP to NGINX.




  reply	other threads:[~2022-10-12  7:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-10  4:39 [bug#58405] [PATCH] services: nginx: Add reload action EuAndreh via Guix-patches via
2022-10-11 10:51 ` Christopher Baines
2022-10-12  7:00   ` EuAndreh via Guix-patches via [this message]
2022-10-13 10:40     ` Christopher Baines
2022-10-13 11:38       ` bug#58405: " Christopher Baines
2022-10-13 16:02       ` [bug#58405] " EuAndreh via Guix-patches via
2022-10-13 16:38         ` EuAndreh via Guix-patches via
2022-10-14 10:43         ` Christopher Baines
2022-10-13 14:02 ` Ludovic Courtès
2022-10-13 16:05   ` EuAndreh via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=166555804644.2805.1693234721157753050@localhost \
    --to=guix-patches@gnu.org \
    --cc=58405@debbugs.gnu.org \
    --cc=eu@euandre.org \
    --cc=mail@cbaines.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.