unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#58590] [PATCH 0/2] Rework nginx-shepherd reload
@ 2022-10-17 20:57 EuAndreh via Guix-patches via
  2022-10-17 20:57 ` [bug#58590] [PATCH 1/2] services: nginx: Use nginx-action over inline gexp EuAndreh via Guix-patches via
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: EuAndreh via Guix-patches via @ 2022-10-17 20:57 UTC (permalink / raw)
  To: 58590; +Cc: EuAndreh, mail

As discussed in [0], improve the documentation of the "reload" action
of nginx, to avoid letting users get into the pitfall of thinking that
a this changes the configuration file, or enables a configuration file
change to be deployed.

[0]: https://issues.guix.gnu.org/58405

EuAndreh (2):
  services: nginx: Use nginx-action over inline gexp.
  services: nginx: Improve reload action documentation.

 gnu/services/web.scm | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

-- 
2.38.0





^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#58590] [PATCH 1/2] services: nginx: Use nginx-action over inline gexp.
  2022-10-17 20:57 [bug#58590] [PATCH 0/2] Rework nginx-shepherd reload EuAndreh via Guix-patches via
@ 2022-10-17 20:57 ` EuAndreh via Guix-patches via
  2022-10-17 21:28   ` [bug#58594] [PATCH 2/2] services: nginx: Improve reload action documentation EuAndreh via Guix-patches via
  2022-10-17 20:57 ` [bug#58589] [PATCH 2/2] services: nginx: Improve reload action documentation EuAndreh via Guix-patches via
  2022-10-18 10:16 ` bug#58590: [PATCH 0/2] Rework nginx-shepherd reload Christopher Baines
  2 siblings, 1 reply; 7+ messages in thread
From: EuAndreh via Guix-patches via @ 2022-10-17 20:57 UTC (permalink / raw)
  To: 58590; +Cc: EuAndreh

* gnu/services/web.scm (nginx-shepherd-service): Use the simpler
"nginx-action" helper, for the same reload side-effect.
---
 gnu/services/web.scm | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 227a577de3..7fde8824b3 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -820,13 +820,7 @@ (define (nginx-shepherd-service config)
                (shepherd-action
                  (name 'reload)
                  (documentation "Reload NGINX configuration file and restart worker processes.")
-                 (procedure
-                   #~(lambda (pid)
-                       (if pid
-                         (begin
-                           (kill pid SIGHUP)
-                           (format #t "Service NGINX (PID ~a) has been reloaded." pid))
-                         (format #t "Service NGINX is not running."))))))))))))
+                 (procedure (nginx-action "-s" "reload"))))))))))
 
 (define nginx-service-type
   (service-type (name 'nginx)
-- 
2.38.0





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#58589] [PATCH 2/2] services: nginx: Improve reload action documentation.
  2022-10-17 20:57 [bug#58590] [PATCH 0/2] Rework nginx-shepherd reload EuAndreh via Guix-patches via
  2022-10-17 20:57 ` [bug#58590] [PATCH 1/2] services: nginx: Use nginx-action over inline gexp EuAndreh via Guix-patches via
@ 2022-10-17 20:57 ` EuAndreh via Guix-patches via
       [not found]   ` <handler.58589.B.1666040265948.ack@debbugs.gnu.org>
  2022-10-18 10:16 ` bug#58590: [PATCH 0/2] Rework nginx-shepherd reload Christopher Baines
  2 siblings, 1 reply; 7+ messages in thread
From: EuAndreh via Guix-patches via @ 2022-10-17 20:57 UTC (permalink / raw)
  To: 58589; +Cc: EuAndreh

* gnu/services/web.scm (nginx-shepherd-service): Be explicit about the
reload action not changing the configuration file, but instead
respawning worker processes.
---
 gnu/services/web.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 7fde8824b3..2023119037 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -819,7 +819,11 @@ (define (nginx-shepherd-service config)
               (list
                (shepherd-action
                  (name 'reload)
-                 (documentation "Reload NGINX configuration file and restart worker processes.")
+                 (documentation "Reload nginx configuration file and restart worker processes.
+This has the effect of killing old worker processes and starting new ones, using
+the same configuration file.  It is useful for situations where the same nginx
+configuration file can point to different things after a reload, such as
+renewed TLS certificates, or @code{include}d files.")
                  (procedure (nginx-action "-s" "reload"))))))))))
 
 (define nginx-service-type
-- 
2.38.0





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#58594] [PATCH 2/2] services: nginx: Improve reload action documentation.
  2022-10-17 20:57 ` [bug#58590] [PATCH 1/2] services: nginx: Use nginx-action over inline gexp EuAndreh via Guix-patches via
@ 2022-10-17 21:28   ` EuAndreh via Guix-patches via
       [not found]     ` <handler.58594.B.16660421334234.ack@debbugs.gnu.org>
  0 siblings, 1 reply; 7+ messages in thread
From: EuAndreh via Guix-patches via @ 2022-10-17 21:28 UTC (permalink / raw)
  To: 58594; +Cc: EuAndreh

* gnu/services/web.scm (nginx-shepherd-service): Be explicit about the
reload action not changing the configuration file, but instead
respawning worker processes.
---
 gnu/services/web.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 7fde8824b3..2023119037 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -819,7 +819,11 @@ (define (nginx-shepherd-service config)
               (list
                (shepherd-action
                  (name 'reload)
-                 (documentation "Reload NGINX configuration file and restart worker processes.")
+                 (documentation "Reload nginx configuration file and restart worker processes.
+This has the effect of killing old worker processes and starting new ones, using
+the same configuration file.  It is useful for situations where the same nginx
+configuration file can point to different things after a reload, such as
+renewed TLS certificates, or @code{include}d files.")
                  (procedure (nginx-action "-s" "reload"))))))))))
 
 (define nginx-service-type
-- 
2.38.0





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#58594] Acknowledgement ([PATCH 2/2] services: nginx: Improve reload action documentation.)
       [not found]     ` <handler.58594.B.16660421334234.ack@debbugs.gnu.org>
@ 2022-10-17 21:42       ` EuAndreh via Guix-patches via
  0 siblings, 0 replies; 7+ messages in thread
From: EuAndreh via Guix-patches via @ 2022-10-17 21:42 UTC (permalink / raw)
  To: 58594; +Cc: control

close 58594
Superseded by 58590.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#58589] Acknowledgement ([PATCH 2/2] services: nginx: Improve reload action documentation.)
       [not found]   ` <handler.58589.B.1666040265948.ack@debbugs.gnu.org>
@ 2022-10-17 21:49     ` EuAndreh via Guix-patches via
  0 siblings, 0 replies; 7+ messages in thread
From: EuAndreh via Guix-patches via @ 2022-10-17 21:49 UTC (permalink / raw)
  To: 58589; +Cc: control

close 58589
Superseded by 58590.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#58590: [PATCH 0/2] Rework nginx-shepherd reload
  2022-10-17 20:57 [bug#58590] [PATCH 0/2] Rework nginx-shepherd reload EuAndreh via Guix-patches via
  2022-10-17 20:57 ` [bug#58590] [PATCH 1/2] services: nginx: Use nginx-action over inline gexp EuAndreh via Guix-patches via
  2022-10-17 20:57 ` [bug#58589] [PATCH 2/2] services: nginx: Improve reload action documentation EuAndreh via Guix-patches via
@ 2022-10-18 10:16 ` Christopher Baines
  2 siblings, 0 replies; 7+ messages in thread
From: Christopher Baines @ 2022-10-18 10:16 UTC (permalink / raw)
  To: EuAndreh; +Cc: 58590-done

[-- Attachment #1: Type: text/plain, Size: 718 bytes --]


EuAndreh <eu@euandre.org> writes:

> As discussed in [0], improve the documentation of the "reload" action
> of nginx, to avoid letting users get into the pitfall of thinking that
> a this changes the configuration file, or enables a configuration file
> change to be deployed.
>
> [0]: https://issues.guix.gnu.org/58405
>
> EuAndreh (2):
>   services: nginx: Use nginx-action over inline gexp.
>   services: nginx: Improve reload action documentation.
>
>  gnu/services/web.scm | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)

Thanks, I've pushed these two commits to master now (as
117b0a65c832dcec592a64284910c01f595aa84a and
dbdc8f64e7e2d35abbfbfc40ac06cf103207d99e).

Thanks again,

Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-10-18 10:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-17 20:57 [bug#58590] [PATCH 0/2] Rework nginx-shepherd reload EuAndreh via Guix-patches via
2022-10-17 20:57 ` [bug#58590] [PATCH 1/2] services: nginx: Use nginx-action over inline gexp EuAndreh via Guix-patches via
2022-10-17 21:28   ` [bug#58594] [PATCH 2/2] services: nginx: Improve reload action documentation EuAndreh via Guix-patches via
     [not found]     ` <handler.58594.B.16660421334234.ack@debbugs.gnu.org>
2022-10-17 21:42       ` [bug#58594] Acknowledgement ([PATCH 2/2] services: nginx: Improve reload action documentation.) EuAndreh via Guix-patches via
2022-10-17 20:57 ` [bug#58589] [PATCH 2/2] services: nginx: Improve reload action documentation EuAndreh via Guix-patches via
     [not found]   ` <handler.58589.B.1666040265948.ack@debbugs.gnu.org>
2022-10-17 21:49     ` [bug#58589] Acknowledgement ([PATCH 2/2] services: nginx: Improve reload action documentation.) EuAndreh via Guix-patches via
2022-10-18 10:16 ` bug#58590: [PATCH 0/2] Rework nginx-shepherd reload Christopher Baines

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).