Skip to content

Commit

Permalink
CCM: Fix improper display of ip prefix.
Browse files Browse the repository at this point in the history
When passing `NetPrefix` as an argument to `ccm populate` it is
formatted using `.to_string()` method. Result of this is then concatenated
with the node id, and the result is an "ip" that ccm tries to find in
Scylla logs to determine that the node is UP.

`.to_string()` implementation was displaying the whole ip, instead of
it's first 3 octets, resulting in CCM looking for ips like `127.0.1.02`.
Instead the `to_str()` method should be used, that produces ccm-compatible
form of the ip range.
  • Loading branch information
Lorak-mmk committed Feb 12, 2025
1 parent f1de757 commit d9a1ed5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scylla/tests/ccm_integration/ccm/ip_allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl NetPrefix {

impl std::fmt::Display for NetPrefix {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.0)
write!(f, "{}", self.to_str())
}
}

Expand Down

0 comments on commit d9a1ed5

Please sign in to comment.