pingcap / pingcap/tiup

SSH session may be broken or closed during the operation

Open
#730 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

category/stability status/TODO 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?

We store SSH sessions for hosts in context and reuse them for every SSH operations, but it is possible for the session to be closed or somehow broken before we finish all commands.

There is a cased that when ControlMaster and ControlPath is set in the SSH config of console server, random timeout error might be observed during operations like start for the cluster, while filtering only some roles / nodes avoids that error.

It's possible that when there are more instances than some number, the SSH session is used too late after it was created, and at that time it is already closed or stalled.

  1. What did you expect to see?
    We should find a better way handling SSH sessions, maybe send keepalive packets?

  2. What did you see instead?
    Some operations got random timeout error on large cluster.

  3. What version of TiUP are you using (tiup --version)?
    v1.0.8, and should be valid on v1.1.0 too.

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 locating the SSH session reuse used by cluster start operations and reproduce the timeout on a large cluster with ControlMaster and ControlPath configured. The issue names no files or tests, so first map the relevant entry points and existing session handling. Done means large-cluster operations no longer fail randomly when a reused session is closed or stalled.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
devops, infrastructure
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.