Skip to content

wsrep_cluster_name ignored if exceeds 32 characters — logs shows Connection Timeout, node fails to join cluster. #678

@riyuuzaki-git

Description

@riyuuzaki-git

Description

When setting wsrep_cluster_name to a value longer than 32 char, Galera nodes silently fail to join the cluster. There are no errors or warnings in the logs, even with maximum verbosity settings enabled. The only observable behaviour is that the node is unable to join quorum.

This makes the issue difficult to detect and debug, particularly for users unfamiliar with the 32-character limit (which is not clearly enforced or documented at runtime).

How to Reproduce

  1. Configure two MariaDB Galera nodes with:
wsrep_cluster_name = this_is_a_cluster_name_that_is_over_32_chars_long
  1. Ensure both nodes have the following verbosity enabled:
wsrep_debug = 1
wsrep_min_log_verbosity = 3
log_error_verbosity = 3
  1. Start the first node (bootstrap), then try to start the second node.

Expected Behaviour

A log entry indicating:

That wsrep_cluster_name exceeded the allowed length.
Or a mismatch due to this issue.

Actual Behaviour

No log error or warning indicating that wsrep_cluster_name was mismatched or exceeding 32 characters in logs.
Node fails to join the cluster/quorum with error Connection Timeout.

Impact

Debugging is difficult since logs give no clue.

The cluster appears to fail with connection errors leading to investigation on the network part, violating the principle of least surprise.

Suggested Fix

Add a validation log at startup if wsrep_cluster_name exceeds 32 characters
Log a warning or error if there is a name mismatch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions