mirror of
https://github.com/jorisvink/kore
synced 2025-03-09 04:29:02 -04:00
Give keymgr up to 60 seconds to start under ACME=1.
The keymgr is responsible for generating private keys for the account and domains which can take a while. However the worker supervisor still only gave keymgr 5 seconds to start which usually leads to strange errors when trying to start keymgr with ACME=1 if no account-key was present.
This commit is contained in:
parent
5df4d075cf
commit
d3afe09d4e
@ -182,8 +182,8 @@ kore_worker_init(void)
|
|||||||
int
|
int
|
||||||
kore_worker_spawn(u_int16_t idx, u_int16_t id, u_int16_t cpu)
|
kore_worker_spawn(u_int16_t idx, u_int16_t id, u_int16_t cpu)
|
||||||
{
|
{
|
||||||
int cnt;
|
|
||||||
struct kore_worker *kw;
|
struct kore_worker *kw;
|
||||||
|
int cnt, maxcnt;
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
int status;
|
int status;
|
||||||
#endif
|
#endif
|
||||||
@ -204,8 +204,13 @@ kore_worker_spawn(u_int16_t idx, u_int16_t id, u_int16_t cpu)
|
|||||||
!kore_connection_nonblock(kw->pipe[1], 0))
|
!kore_connection_nonblock(kw->pipe[1], 0))
|
||||||
fatal("could not set pipe fds to nonblocking: %s", errno_s);
|
fatal("could not set pipe fds to nonblocking: %s", errno_s);
|
||||||
|
|
||||||
|
maxcnt = 50;
|
||||||
|
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case KORE_WORKER_KEYMGR:
|
case KORE_WORKER_KEYMGR:
|
||||||
|
#if defined(KORE_USE_ACME)
|
||||||
|
maxcnt = 600;
|
||||||
|
#endif
|
||||||
kw->ps = &keymgr_privsep;
|
kw->ps = &keymgr_privsep;
|
||||||
break;
|
break;
|
||||||
#if defined(KORE_USE_ACME)
|
#if defined(KORE_USE_ACME)
|
||||||
@ -227,7 +232,7 @@ kore_worker_spawn(u_int16_t idx, u_int16_t id, u_int16_t cpu)
|
|||||||
kore_worker_entry(kw);
|
kore_worker_entry(kw);
|
||||||
exit(1);
|
exit(1);
|
||||||
} else {
|
} else {
|
||||||
for (cnt = 0; cnt < 50; cnt++) {
|
for (cnt = 0; cnt < maxcnt; cnt++) {
|
||||||
if (kw->ready == 1)
|
if (kw->ready == 1)
|
||||||
break;
|
break;
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user