From 1abc9a3bd3897f6f5cdae5fb3a1dec2e06b4a8d3 Mon Sep 17 00:00:00 2001 From: Sebastian Hahn Date: Thu, 1 Feb 2024 10:34:30 +0100 Subject: dirauth: Warn when failing to post during a vote The only way to figure out that posting a vote or signatures to another dirauth failed is by counting how many success messages there are on notice level, and noticing that it is fewer than the number of configured dirauths. Closes #40910. --- src/feature/dirclient/dirclient.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/feature/dirclient/dirclient.c b/src/feature/dirclient/dirclient.c index 84eefdd90b..9aa3164a65 100644 --- a/src/feature/dirclient/dirclient.c +++ b/src/feature/dirclient/dirclient.c @@ -101,7 +101,7 @@ dir_conn_purpose_to_string(int purpose) case DIR_PURPOSE_UPLOAD_DIR: return "server descriptor upload"; case DIR_PURPOSE_UPLOAD_VOTE: - return "server vote upload"; + return "consensus vote upload"; case DIR_PURPOSE_UPLOAD_SIGNATURES: return "consensus signature upload"; case DIR_PURPOSE_FETCH_SERVERDESC: @@ -763,6 +763,11 @@ connection_dir_client_request_failed(dir_connection_t *conn) "directory server at %s; will retry", connection_describe_peer(TO_CONN(conn))); connection_dir_download_routerdesc_failed(conn); + } else if (conn->base_.purpose == DIR_PURPOSE_UPLOAD_VOTE || + conn->base_.purpose == DIR_PURPOSE_UPLOAD_SIGNATURES) { + log_warn(LD_DIR, "Failed to post %s to %s.", + dir_conn_purpose_to_string(conn->base_.purpose), + connection_describe_peer(TO_CONN(conn))); } } -- cgit v1.2.3-54-g00ecf From bbf8f0f1fbcbd8194d5e7333ce9f2b4d535783e4 Mon Sep 17 00:00:00 2001 From: Sebastian Hahn Date: Thu, 1 Feb 2024 16:45:58 +0100 Subject: Add a changes file --- changes/bug40910 | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changes/bug40910 diff --git a/changes/bug40910 b/changes/bug40910 new file mode 100644 index 0000000000..fabe701d19 --- /dev/null +++ b/changes/bug40910 @@ -0,0 +1,5 @@ + o Minor bugfixes (directory authorities): + - Add a warning when publishing a vote or signatures to another + directory authority fails. Fixes bug 40910, bugfix on + 0.2.0.3-alpha. + -- cgit v1.2.3-54-g00ecf From 4db6ab5c181fa85deb92076588d71cac73339dad Mon Sep 17 00:00:00 2001 From: Sebastian Hahn Date: Thu, 1 Feb 2024 17:16:17 +0100 Subject: Update test strings --- src/test/test_dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/test_dir.c b/src/test/test_dir.c index 4ecf31038e..d09afcb9e6 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -5265,7 +5265,7 @@ test_dir_conn_purpose_to_string(void *data) tt_str_op(dir_conn_purpose_to_string(purpose), OP_EQ, expected); EXPECT_CONN_PURPOSE(DIR_PURPOSE_UPLOAD_DIR, "server descriptor upload"); - EXPECT_CONN_PURPOSE(DIR_PURPOSE_UPLOAD_VOTE, "server vote upload"); + EXPECT_CONN_PURPOSE(DIR_PURPOSE_UPLOAD_VOTE, "consensus vote upload"); EXPECT_CONN_PURPOSE(DIR_PURPOSE_UPLOAD_SIGNATURES, "consensus signature upload"); EXPECT_CONN_PURPOSE(DIR_PURPOSE_FETCH_SERVERDESC, "server descriptor fetch"); -- cgit v1.2.3-54-g00ecf From 6b665f25e2b9d2a51fac4968d88e8ae45d4d71d7 Mon Sep 17 00:00:00 2001 From: Sebastian Hahn Date: Tue, 6 Feb 2024 19:52:44 +0100 Subject: Try to appease the changefile format checker --- changes/bug40910 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changes/bug40910 b/changes/bug40910 index fabe701d19..6de15bf8c9 100644 --- a/changes/bug40910 +++ b/changes/bug40910 @@ -1,5 +1,5 @@ o Minor bugfixes (directory authorities): - Add a warning when publishing a vote or signatures to another - directory authority fails. Fixes bug 40910, bugfix on + directory authority fails. Fixes bug 40910; bugfix on 0.2.0.3-alpha. -- cgit v1.2.3-54-g00ecf