pingcap / pingcap/tiup

tiup-dm import failed after upgrade to 1.4.0

Open
#1,266 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ansible status/investigating 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?

deploy dm v1.0

inventory.ini

## DM modules
[dm_master_servers]
dm_master ansible_host=172.28.0.101

[dm_worker_servers]
dm-worker1 ansible_host=172.28.0.111  server_id=101 source_id="mysql-replica-01" mysql_host=mysql1 mysql_user=root mysql_password='' mysql_port=3306

dm-worker2 ansible_host=172.28.0.112  server_id=101 source_id="mysql-replica-02" mysql_host=mysql2 mysql_user=root mysql_password='' mysql_port=3306

## Monitoring modules
[prometheus_servers]
prometheus ansible_host=172.28.0.121

[grafana_servers]
grafana ansible_host=172.28.0.121

[alertmanager_servers]
alertmanager ansible_host=172.28.0.121

## Global variables
[all:vars]
cluster_name = dm-v1

ansible_user = tidb

dm_version = v1.0.6

deploy_dir = /home/tidb/deploy

grafana_admin_user = "admin"
grafana_admin_password = "admin"

tiup dm import --yes --dir=/home/tidb/dm-ansible --cluster-version v2.0.1
2. What did you expect to see?
upgrade successfully

  1. What did you see instead?
Will use the following topology to deploy a DM cluster: 
global:
  deploy_dir: /home/tidb/deploy
  log_dir: /home/tidb/deploy/log
master_servers:
- host: 172.28.0.101
  ssh_port: 22
  port: 8261
  log_dir: /home/tidb/deploy/log
  config:
    log-level: info
  v1_source_path: /home/tidb/deploy/v1source
worker_servers:
- host: 172.28.0.111
  ssh_port: 22
  port: 8262
  deploy_dir: /home/tidb/deploy
  log_dir: /home/tidb/deploy/log
  config:
    log-level: info
- host: 172.28.0.112
  ssh_port: 22
  port: 8262
  deploy_dir: /home/tidb/deploy
  log_dir: /home/tidb/deploy/log
  config:
    log-level: info
monitoring_servers:
- host: 172.28.0.121
  ssh_port: 22
  port: 9090
  data_dir: /home/tidb/deploy/prometheus.data.metrics
  log_dir: /home/tidb/deploy/log
  external_alertmanagers: []
grafana_servers:
- host: 172.28.0.121
  ssh_port: 22
  port: 3000
  username: admin
  password: admin
  anonymous_enable: false
  root_url: ""
  domain: ""
alertmanager_servers:
- host: 172.28.0.121
  ssh_port: 22
  web_port: 9093
  cluster_port: 0
  data_dir: /home/tidb/deploy/data.alertmanager
  log_dir: /home/tidb/deploy/log


Error: Deploy directory overlaps to another instance (spec.deploy.dir_overlap)

The directory you specified in the topology file is:
  Directory: log directory /home/tidb/deploy/log
  Component: prometheus 172.28.0.121

It overlaps to another instance:
  Other Directory: log directory /home/tidb/deploy/log
  Other Component: alertmanager 172.28.0.121

Please modify the topology file and try again.
Error: run `/root/.tiup/components/dm/v1.4.0/tiup-dm` (wd:/root/.tiup/data/STII9GU) failed: exit status 1
  1. What version of TiUP are you using (tiup --version)?
1.4.0 tiup
Go Version: go1.16.2
Git Ref: v1.4.0
GitHash: eb335e6ad9d0dc19d1c43db422cd409d62bc3cea

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 with the tiup dm import entry point and the spec.deploy.dir_overlap validation that rejects the generated topology. Reproduce the command using the supplied inventory and inspect why Prometheus and Alertmanager receive the same log directory after the upgrade. Done means the provided import or upgrade no longer fails on this overlap error.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible, go
Domain
cli, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.