This is an automated email from the ASF dual-hosted git repository. mpochatkin pushed a commit to branch IGN-28024 in repository https://gitbox.apache.org/repos/asf/ignite-3.git
commit edb96499fd44a92a965a826c94d8f757f0f36bad Author: Pochatkin Mikhail <[email protected]> AuthorDate: Thu Mar 19 17:20:56 2026 +0300 IGN-28024 Fix misleading message when connecting to a starting node When a node is still starting up (e.g., after restart), the CLI showed "The cluster is not initialized" which is incorrect. Changed the message to cover both possible cases: cluster not initialized or node still starting. Updated the integration test accordingly. --- .../internal/cli/commands/ItNotInitializedClusterReplTest.java | 4 +++- .../ignite/internal/cli/call/connect/ConnectSuccessCall.java | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/modules/cli/src/integrationTest/java/org/apache/ignite/internal/cli/commands/ItNotInitializedClusterReplTest.java b/modules/cli/src/integrationTest/java/org/apache/ignite/internal/cli/commands/ItNotInitializedClusterReplTest.java index b5fa6d0b512..f32d784bf8d 100644 --- a/modules/cli/src/integrationTest/java/org/apache/ignite/internal/cli/commands/ItNotInitializedClusterReplTest.java +++ b/modules/cli/src/integrationTest/java/org/apache/ignite/internal/cli/commands/ItNotInitializedClusterReplTest.java @@ -43,7 +43,9 @@ public class ItNotInitializedClusterReplTest extends ItNotInitializedClusterTest assertAll( this::assertErrOutputIsEmpty, () -> assertOutputContains("Connected to http://localhost:10300" + System.lineSeparator() - + "The cluster is not initialized. Run cluster init command to initialize it.") + + "The cluster is not initialized or the node has not finished starting yet." + + " If this is a new cluster, run cluster init command to initialize it." + + " If the node was recently restarted, please try again shortly.") ); } diff --git a/modules/cli/src/main/java/org/apache/ignite/internal/cli/call/connect/ConnectSuccessCall.java b/modules/cli/src/main/java/org/apache/ignite/internal/cli/call/connect/ConnectSuccessCall.java index 97f12b925b2..0f07e3814c4 100644 --- a/modules/cli/src/main/java/org/apache/ignite/internal/cli/call/connect/ConnectSuccessCall.java +++ b/modules/cli/src/main/java/org/apache/ignite/internal/cli/call/connect/ConnectSuccessCall.java @@ -80,8 +80,13 @@ public class ConnectSuccessCall { try { new ClusterManagementApi(clientFactory.getClient(sessionInfo.nodeUrl())).clusterState(); } catch (ApiException e) { - if (e.getCode() == 409) { // CONFLICT means the cluster is not initialized yet - builder.hint("The cluster is not initialized. Run %s command to initialize it.", UiElements.command("cluster init")); + if (e.getCode() == 409) { // CONFLICT means the cluster is not initialized yet or the node is still starting + builder.hint( + "The cluster is not initialized or the node has not finished starting yet." + + " If this is a new cluster, run %s command to initialize it." + + " If the node was recently restarted, please try again shortly.", + UiElements.command("cluster init") + ); } } }
