diff --git a/src/controller/config_repl.c b/src/controller/config_repl.c index a074da3..430bee9 100644 --- a/src/controller/config_repl.c +++ b/src/controller/config_repl.c @@ -96,9 +96,9 @@ int load_primary_config(cluster_t *c) char fname[256] = {0}; int rc = conf_read_current_filename(conf_dir, fname, sizeof(fname)); if (rc != 0) { - ERROR("Primary has no config at '%s/conf/current' (rc=%d) — " - "provision the config before starting", - conf_dir, rc); + INFO("No config at '%s/conf/current' (rc=%d) — " + "will fetch from primary after election", + conf_dir, rc); return -ENOENT; } @@ -924,7 +924,7 @@ int fetch_config_from_primary(cluster_t *c) uint32_t delay_ms = 500; const uint32_t max_delay_ms = 5000; - const int max_attempts = 20; + const int max_attempts = 60; /* up to 5min: primary may still be initializing */ for (int attempt = 0; attempt < max_attempts; attempt++) { /* If promoted during retry, switch to primary path */ diff --git a/src/lib/netio.c b/src/lib/netio.c index ad761da..26e960e 100644 --- a/src/lib/netio.c +++ b/src/lib/netio.c @@ -449,8 +449,11 @@ static int handle_ssl_handshake(endpoint_t* ep) rc = 0; break; default: - errno = ecode; - perror("SSL_do_handshake"); + /* Only log if it's a genuine error (not errno=0 after success) */ + if (ecode != 0) { + errno = ecode; + perror("SSL_do_handshake"); + } rc = handle_error(ep); break; }