pingcap / pingcap/tiup

Should I add the % network interface suffix after the IPv6 address?

Open
#2,151 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type/bug
Dominant language
Go
Stars
466
Forks
338
Avg merge
3d 7h
Merged PRs (30d)
8

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

I write host with ipv6 in topo file like this:

host: "fe40::e8aa:e364:560b"

deploy failed

Error: failed to fetch cpu-arch or kernel-name: executor.ssh.execute_failed: Failed to execute command over SSH for 'tidb@fe40::e8aa:e364:560b:9000' {ssh_stderr: , ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin /usr/bin/sudo -H bash -c "uname -m"}, cause: dial tcp [fe40::e8aa:e364:560b]:9000: connect: invalid argument

If host add a network interface suffix like this:

host: "fe40::e8aa:e364:560b%enp1s0"

deploy success but start failed.

pd.log:

[2023/03/30 17:55:46.559 +08:00] [FATAL] [main.go:100] ["create server failed"] [error="[PD:url:ErrURLParse]parse \"http://[fe40::e8aa:e364:560b%enp1s0]:2380\": invalid URL escape \"%en\": parse \"http://[fe40::e8aa:e364:560b%enp1s0]:2380\": invalid URL escape \"%en\""] [stack="main.main\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/pd/cmd/pd-server/main.go:100\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:250"]
  1. What did you expect to see?

deploy and start success use ipv6

  1. What did you see instead?
    deploy failed

  2. What version of TiUP are you using (tiup --version)?
    master branch
    tidb version: v6.5.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the IPv6 deployment with and without the interface suffix, then trace TiUP's host handling and the generated PD URL; the payload's stack trace points to cmd/pd-server/main.go:100. Done means deployment and startup succeed for the reported IPv6 address forms without invalid URL or connection errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.