Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPv6 formatting in SCT different than Scylla, making it difficult to correlate logs #8910

Open
kbr-scylla opened this issue Oct 2, 2024 · 3 comments
Assignees

Comments

@kbr-scylla
Copy link

parallel-topology-schema-changes-mu-db-node-e330a762-9/messages.log:

2024-09-10T15:26:20.812+00:00 parallel-topology-schema-changes-mu-db-node-e330a762-9     !INFO | scylla[7134]:  [shard 0:main] init - seeds={2a05:d018:12e3:f000:455b:e46c:ed49:95c6}, listen_address=2a05:d01c:964:7d01:9e5:bac1:a3ae:f921, broadcast_address=2a05:d01c:964:7d01:9e5:bac1:a3ae:f921

note the broadcast_address=2a05:d01c:964:7d01:9e5:bac1:a3ae:f921

SCT log printing about that node:

< t:2024-09-10 16:05:46,444 f:cluster_aws.py  l:686  c:sdcm.cluster_aws     p:DEBUG > Node parallel-topology-schema-changes-mu-db-node-e330a762-9 [13.41.197.3 | 10.3.6.191 | 2a05:d01c:0964:7d01:09e5:bac1:a3ae:f921] (dc name: eu-west-2scylla_node_west, rack: 2b): ip_address is: 2a05:d01c:0964:7d01:09e5:bac1:a3ae:f921

ip_address is: 2a05:d01c:0964:7d01:09e5:bac1:a3ae:f921

find the difference...

@kbr-scylla
Copy link
Author

@kbr-scylla kbr-scylla removed their assignment Oct 2, 2024
@fruch
Copy link
Contributor

fruch commented Oct 6, 2024

it's on purpose, since scylla or some of the tooling (i.e. nodetool) and cloud provider, we returning different formats
we decided to always use the full format, with leading zeros, to be able to compare correctly.

question is why scylla use the short format ?

is it specified anywhere in scylla code ? or by product of something else ?

@kbr-scylla
Copy link
Author

looks like IPv6 printing was added in scylladb/seastar@97102fa by @elcallio
implementation

std::ostream& seastar::net::operator<<(std::ostream& os, const ipv6_address& a) {
    char buffer[64];
    return os << ::inet_ntop(AF_INET6, a.ip.data(), buffer, sizeof(buffer));
}

so it's using the standard inet_ntop function https://man7.org/linux/man-pages/man3/inet_ntop.3.html
defined in RFC 2553 https://datatracker.ietf.org/doc/html/rfc2553#section-6.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants