wrong scp command with ipv6 address
Open
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!
- What did you do?
tiup deploy yaml:
global:
user: "user"
systemd_mode: "user"
deploy_dir: "/data00/tikv/tikv-deploy"
data_dir: "/data00/tikv/tikv-data"
arch: "amd64"
server_configs:
tikv:
server.grpc-compression-type: gzip
raftstore.raft-entry-max-size: 1GB
raftstore.raft-max-size-per-msg: 1GB
server.max-grpc-send-msg-len: 1073741824
pd_servers:
- host: "fdbd:dc0c:1:121a::51"
- .....
tikv_servers:
- host: "fdbd:dc0c:1:121a::51"
port: 20160
status_port: 20180
deploy_dir: "/data00/tikv/tikv-deploy/tikv-20160"
data_dir: "/data00/tikv/tikv-data/tikv-20160"
log_dir: "/data00/tikv/tikv-20160/log"
- ...
tiup cluster check deploy-online.yaml --user user --ssh=system
- What did you expect to see?
everything is good.
- What did you see instead?
Error: failed to scp /home/user/.tiup/storage/cluster/packages/insight-v0.4.2-linux-amd64.tar.gz to fdbd:dc0c:1:121a::51:/tmp/tiup/bin/insight-v0.4.2-linux-amd64.tar.gz: executor.ssh.execute_failed: Failed to transfer file over SCP for 'user@fdbd:dc0c:1:121a::51:22' {ssh_stderr: ssh: Could not resolve hostname fdbd: Name or service not known
lost connection
, ssh_stdout: , ssh_command: scp -r -o StrictHostKeyChecking=no -o ConnectTimeout=5 /home/user/.tiup/storage/cluster/packages/insight-v0.4.2-linux-amd64.tar.gz user@fdbd:dc0c:1:121a::51:/tmp/tiup/bin/insight-v0.4.2-linux-amd64.tar.gz}, cause: exit status 1
it seems that the problem is caused by missing '[]' at ipv6 address in scp command
- What version of TiUP are you using (
tiup --version)?
$ tiup --version
1.16.2 tiup
Go Version: go1.21.13
Git Ref: v1.16.2
GitHash: 678c52de0c0ef30634b8ba7302a8376caa95d50d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the tiup cluster check path that constructs the SCP command for hosts from the YAML configuration, using the IPv6 reproduction in this issue. Verify how the host is formatted before execution. Done means the generated SCP command brackets IPv6 addresses and the transfer succeeds for the provided configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100