Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dmctl: can not use higher version of dmctl to to start task for lower version cluster when tls is enabled #9392

Open
fubinzh opened this issue Jul 17, 2023 · 2 comments

Comments

@fubinzh
Copy link

fubinzh commented Jul 17, 2023

What did you do?

  1. deploy 7.1.1 dm cluster with tls enabled
tiup dm deploy testdm v7.1.1 /tmp/2023-07-17T04:03:02Z.tiup.yaml -y
[root@tiup-0 ~]# cat /tmp/2023-07-17T12\:37\:50+08\:00.tiup.yaml 

global:
  user: "tidb"
  deploy_dir: "/tiup/deploy"
  data_dir: "/tiup/data"
  enable_tls: true
server_configs:
 tidb:
  security.auto-tls: true
  security.ssl-ca: "/tiup/deploy/tidb-4000/tls/ca.crt"
  security.ssl-cert: "/tiup/deploy/tidb-4000/tls/tidb.crt"
  security.ssl-key: "/tiup/deploy/tidb-4000/tls/tidb.pem"
pd_servers:
  - host: tiup-peer
tidb_servers:
  - host: tiup-peer     
    status_port: 10089 
tikv_servers:
  - host: tiup-peer
monitoring_servers:
  - host: tiup-peer
grafana_servers:
  - host: tiup-peer
alertmanager_servers:
  - host: tiup-peer

  1. create a source
  2. use dmctl:v7.2.0 to start a dm task, task configiuration as below:
[root@tiup-0 ~]# cat /tmp/task.yaml 
name: test-infra
task-mode: all
is-sharding: true
shard-mode: "optimistic"
meta-schema: "dm_meta"
target-database:
    host: "tiup-peer"
    port: 4000
    user: "root"
    password: ""
    security:
        ssl-ca: "/tiup/deploy/tidb-4000/tls/ca.crt"
        ssl-cert: "/tiup/deploy/tidb-4000/tls/tidb.crt"
        ssl-key: "/tiup/deploy/tidb-4000/tls/tidb.pem"


mysql-instances:
    -   source-id: "source-0"
        block-allow-list: "instance"

block-allow-list:
    instance:
        do-dbs: [ "test" ]

What did you expect to see?

  1. create task should be successful

What did you see instead?

  1. create task failed
[root@tiup-0 ~]# tiup dmctl:v7.2.0  --master-addr tiup-peer:8261 --ssl-ca /tiup/deploy/dm-master-8261/tls/ca.crt --ssl-cert /tiup/deploy/dm-master-8261/tls/dm-master.crt --ssl-key /tiup/deploy/dm-master-8261/tls/dm-master.pem start-task /tmp/task.yaml              
Starting component `dmctl`: /root/.tiup/components/dmctl/v7.2.0/dmctl/dmctl /root/.tiup/components/dmctl/v7.2.0/dmctl/dmctl --master-addr tiup-peer:8261 --ssl-ca /tiup/deploy/dm-master-8261/tls/ca.crt --ssl-cert /tiup/deploy/dm-master-8261/tls/dm-master.crt --ssl-key /tiup/deploy/dm-master-8261/tls/dm-master.pem start-task /tmp/task.yaml
{
    "result": false,
    "msg": "[code=20003:class=dm-master:scope=internal:level=medium], Message: decode task config failed, RawCause: yaml: unmarshal errors:\n  line 5: field strict-optimistic-shard-mode not found in type config.TaskConfig, Workaround: Please check the configuration file has correct YAML format.",
    "sources": [
    ],
    "checkResult": ""
}

Versions of the cluster

[root@tiup-0 ~]# tiup dmctl:v7.2.0 -V
Starting component dmctl: /root/.tiup/components/dmctl/v7.2.0/dmctl/dmctl /root/.tiup/components/dmctl/v7.2.0/dmctl/dmctl -V
Release Version: v7.2.0
Git Commit Hash: 33e21a7
Git Branch: heads/refs/tags/v7.2.0
UTC Build Time: 2023-06-21 14:48:02
Go Version: go version go1.20.5 linux/amd64
Failpoint Build: false

[root@tiup-0 ~]# /tiup/deploy/dm-master-8261/bin/dm-master/dm-master -V
Release Version: v7.1.1
Git Commit Hash: f8bcbba
Git Branch: heads/refs/tags/v7.1.1
UTC Build Time: 2023-07-13 09:54:35
Go Version: go version go1.20.5 linux/amd64
Failpoint Build: false

current status of DM cluster (execute query-status <task-name> in dmctl)

N/A

@GMHDBJD
Copy link
Contributor

GMHDBJD commented Jul 17, 2023

content = []byte(task.String())

@fubinzh
Copy link
Author

fubinzh commented Jul 17, 2023

/found automation

@ti-chi-bot ti-chi-bot bot added the found/automation Bugs found by automation cases label Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants