pingcap / pingcap/tiup

Deploy fails at mkdir when a previous deploy process exit after user add but creating home dir

Open
#328 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

If a deploy process is interrupted after creating the deploy user on target server, but before the home directory of that user is created, a retry will fail at mkdir as we use ~/.ssh to populate SSH keys, but the path does not exist.

An error saying "permission denied" is reported, it could be confusing to the user, as the real cause is path not exist.

We may change the user add process to ensure home directory created.

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 tracing the deploy flow that adds the target-server user, creates its home directory, and populates ~/.ssh. Reproduce an interrupted deployment before home-directory creation, then verify that retrying succeeds and no longer reports a misleading permission-denied error.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.