[PATCH] services: web: Pass run-directory to nginx's actions.

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Tomas Volf
Owner
unassigned
Submitted by
Tomas Volf
Severity
normal

Debbugs page

Tomas Volf wrote 8 months ago
(address . guix-patches@gnu.org)(name . Tomas Volf)(address . ~@wolfsden.cz)
063981d97d79af7abec66592d40c6beff9adea46.1720191680.git.~@wolfsden.cz
Reloading nginx lead to (harmless, yet annoying) alert being logged:

nginx: [alert] could not open error log file: open() "/gnu/store/9l2lznlqpjcm79znq1xas378maqgysc8-nginx-1.27.0/logs/error.log" failed (2: No such file or directory)

Since there already is prepared runtime directory for nginx, all that was
missing was to also pass it to the reload and reopen invocations.

* gnu/services/web.scm (nginx-shepherd-service)[reload, reopen]: Pass -p flag
with run-directory as value.

Change-Id: Id5c558d65def8c1fe5cf581a4a370508ac05e550
---
gnu/services/web.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (20 lines)
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index c10bd4cdff..b73cd30fe7 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -858,11 +858,11 @@ (define (nginx-shepherd-service config)
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")))
+ (procedure (nginx-action "-p" run-directory "-s" "reload")))
(shepherd-action
(name 'reopen)
(documentation "Re-open log files.")
- (procedure (nginx-action "-s" "reopen"))))))))))
+ (procedure (nginx-action "-p" run-directory "-s" "reopen"))))))))))
(define nginx-service-type
(service-type (name 'nginx)
--
2.45.1
Ludovic Courtès wrote 8 months ago
(name . Tomas Volf)(address . ~@wolfsden.cz)(address . 71949-done@debbugs.gnu.org)
87sewh5om8.fsf@gnu.org
Tomas Volf <~@wolfsden.cz> skribis:

Toggle quote (12 lines)
> Reloading nginx lead to (harmless, yet annoying) alert being logged:
>
> nginx: [alert] could not open error log file: open() "/gnu/store/9l2lznlqpjcm79znq1xas378maqgysc8-nginx-1.27.0/logs/error.log" failed (2: No such file or directory)
>
> Since there already is prepared runtime directory for nginx, all that was
> missing was to also pass it to the reload and reopen invocations.
>
> * gnu/services/web.scm (nginx-shepherd-service)[reload, reopen]: Pass -p flag
> with run-directory as value.
>
> Change-Id: Id5c558d65def8c1fe5cf581a4a370508ac05e550

Applied, thanks!
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 71949@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 71949
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help