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

feat: add IPv6 support #5775

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

feat: add IPv6 support #5775

wants to merge 6 commits into from

Conversation

wey-gu
Copy link
Contributor

@wey-gu wey-gu commented Nov 29, 2023

What type of PR is this?

  • bug
  • feature
  • enhancement

What problem(s) does this PR solve?

Issue(s) number: #4955

Description:

Now it should support dual stack for some friends in the community. This rough change is targeted to create a branch for their quick testing on IPv6-only env(that unfortunately doesn't come with a DNS to mitigate with fqdn)

Note intToIPv4 is not handled due to it's probably for the metad of NebulaGraph v1 only.

thread on creating this pr: https://community-chat.nebula-graph.io/t/16091432/another-question-is-does-nebula-support-ipv6-and-data-migrat#65aae6a6-8b13-4be9-b874-e56de5bc0c82

Checklist:

Tests:

  • Unit test(positive and negative cases)
  • Function test
  • Performance test
  • N/A

Affects:

  • Documentation affected (Please add the label if documentation needs to be modified.)
  • Incompatibility (If it breaks the compatibility, please describe it and add the label.)
  • If it's needed to cherry-pick (If cherry-pick to some branches is required, please label the destination version(s).)
  • Performance impacted: Consumes more CPU/Memory

Release notes:

IPv6 is supported but not fully tested.

close: vesoft-inc#4955

Now it should support dual stack for some friends in community.
This roughly change is targeted to create a branch for their
quick testing on IPv6 only env(that doesnt come with a DNS)

Note intToIPv4 is not handled due to it's probabbly for metad
of NebulaGraph v1 only.
@wey-gu wey-gu added the do not review PR: not ready for the code review yet label Nov 29, 2023
@wey-gu wey-gu mentioned this pull request Nov 29, 2023
@wey-gu
Copy link
Contributor Author

wey-gu commented Nov 29, 2023

ping @congguosn , as talked via slack, you could give a try on your ipv6 env.

@wey-gu
Copy link
Contributor Author

wey-gu commented Nov 29, 2023

It seems to work

Log line format: [IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg
I20231129 14:19:54.027256 62360 GraphDaemon.cpp:122] Starting Graph HTTP Service
I20231129 14:19:54.032068 62362 WebService.cpp:124] Web service started on HTTP[19669]
I20231129 14:19:54.032181 62360 GraphDaemon.cpp:136] Number of networking IO threads: 72
I20231129 14:19:54.032199 62360 GraphDaemon.cpp:145] Number of worker threads: 72
I20231129 14:19:54.043664 62360 MetaClient.cpp:80] Create meta client to "127.0.0.1":9559
I20231129 14:19:54.043692 62360 MetaClient.cpp:81] root path: /usr/local/nebula, data path size: 0
I20231129 14:19:54.098246 62360 MetaClient.cpp:3269] Load leader ok
I20231129 14:19:54.102814 62360 MetaClient.cpp:162] Register time task for heartbeat!
I20231129 14:19:54.105023 62360 GraphSessionManager.cpp:337] Total of 0 sessions are loaded
I20231129 14:19:54.106323 62360 MemoryTracker.h:106] MemoryTracker update limit 8589934592.000GiB -> 150.968GiB
I20231129 14:19:54.106411 62360 MemoryUtils.cpp:171] MemoryTracker set static ratio: 0.8
I20231129 14:19:54.108557 62360 Snowflake.cpp:17] WorkerId init success: 1
I20231129 14:19:54.109128 62469 GraphServer.cpp:63] Starting nebula-graphd on fdd5:4123:e98d:4a86:2832:4cff:fe06:4c4:9669
❯ grep local_ip etc/nebula-graphd.conf
--local_ip=fdd5:4123:e98d:4a86:2832:4cff:fe06:4c4

❯ nebula-console -port 9669 -user root -p nebula -addr fdd5:4123:e98d:4a86:2832:4cff:fe06:4c4

Welcome to Nebula Graph!

(root@nebula) [(none)]> show hosts graph
+------------------------------------------+------+----------+---------+--------------+---------+
| Host                                     | Port | Status   | Role    | Git Info Sha | Version |
+------------------------------------------+------+----------+---------+--------------+---------+
| "fdd5:4123:e98d:4a86:2832:4cff:fe06:4c4" | 9669 | "ONLINE" | "GRAPH" | "e1d7b0051"  | ""      |
+------------------------------------------+------+----------+---------+--------------+---------+
Got 1 rows (time spent 4.773ms/6.843921ms)

@wey-gu wey-gu mentioned this pull request Nov 29, 2023
@wey-gu wey-gu added the ready-for-testing PR: ready for the CI test label Dec 1, 2023
export CPPLINT_EXTENS=cpp,h
export CPPLINT_FILTER=-whitespace/indent,-build/include_what_you_use,-readability/todo,-build/include,-build/header_guard,-runtime/references,-build/c++11

.linters/cpp/cpplint.py --quiet --extensions=$CPPLINT_EXTENS \
                --filter=$CPPLINT_FILTER --linelength=100 src/common/network/NetworkUtils.cpp
patch.diff from formatter
cd src
git apply --reject --whitespace=fix ../patch.diff
it turned out this case should be resolved properly in
running env, as it's not a mock call. Thus we remove it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not review PR: not ready for the code review yet ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant