]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: acme: emit a log when the scheduler can't start the task
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 2 May 2025 14:12:41 +0000 (16:12 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Fri, 2 May 2025 14:12:41 +0000 (16:12 +0200)
Emit an error log when the renewal scheduler can't start the task.

src/acme.c

index e59d4017e8c6103bd31cb4f4a0b9cc8ffa55137f..c2e37c1303f534c98948b80da717b9a1bf2e5bd0 100644 (file)
@@ -2050,6 +2050,7 @@ struct task *acme_scheduler(struct task *task, void *context, unsigned int state
 {
        struct ebmb_node *node = NULL;
        struct ckch_store *store = NULL;
+       char *errmsg = NULL;
 
        if (HA_SPIN_TRYLOCK(CKCH_LOCK, &ckch_lock))
                return task;
@@ -2061,7 +2062,10 @@ struct task *acme_scheduler(struct task *task, void *context, unsigned int state
                if (store->conf.acme.id) {
 
                        if (acme_will_expire(store)) {
-                               acme_start_task(store, NULL);
+                               if (acme_start_task(store, &errmsg) != 0) {
+                                       send_log(NULL, LOG_NOTICE,"acme: %s: %s, aborting.\n", store->path, errmsg ? errmsg : "");
+                                       ha_free(&errmsg);
+                               }
                        }
                }
                node = ebmb_next(node);