tidb 2.1.0 升级到3.0.0 报错 Ansible FAILED! => playbook: rolling_update.yml; TASK: stop PD by systemd; message: {"changed": false, "msg": "Could not find the requested service pd-2379.service: host

【概述】tidb 2.1.0 升级到3.0.0

【背景】在测试环境进行2.1.0升级到3.0.0测试

【现象】业务和数据库现象

【业务影响】

【TiDB 版本】
2.1.0

当我2.1.0的环境准备好后,想通过ansible进行升级到3.0.0.然后再升级到4.0.0,在 rolling_update.yml后发现
ansible 无法停止pd服务,ansible 认为需要停止的是 pd-2379.service,但是我看到真正的pd 在系统的服务名字
就叫pd.service
systemctl staus 状态信息如下

│ └─921019 bin/tidb-server -P 4000 --status=10080 --advertise-address=10.91.0.214 --path=10.91.0.214:2379,10.91.0.94:2379,10.91.0.68:2379 --config=conf/tidb.toml --log-slow-query=/tidbdata/tidb/deploy/log/tidb_slow_query
├─pd.service
│ └─920841 bin/pd-server --name=pd1 --client-urls=http://10.91.0.214:2379 --advertise-client-urls=http://10.91.0.214:2379 --peer-urls=http://10.91.0.214:2380 --advertise-peer-urls=http://10.91.0.214:2380 --data-dir=/tid

下面是ansible rolling-update 过程信息。

TASK [include_tasks] ********************************************************************************************************************************************************************************************************************
included: /home/tidb/tidb-ansible-3.0.0/common_tasks/get_pd_leader.yml for 10.91.0.214

TASK [get PD leader info] ***************************************************************************************************************************************************************************************************************
ok: [10.91.0.214]

TASK [include_tasks] ********************************************************************************************************************************************************************************************************************

TASK [include_tasks] ********************************************************************************************************************************************************************************************************************
included: /home/tidb/tidb-ansible-3.0.0/common_tasks/transfer_pd_leader.yml for 10.91.0.214

TASK [set_fact] *************************************************************************************************************************************************************************************************************************
ok: [10.91.0.214]

TASK [display PD leader name] ***********************************************************************************************************************************************************************************************************
ok: [10.91.0.214] => {
“pd_leader_name”: “pd2”
}

TASK [transfer PD leader to another PD server] ******************************************************************************************************************************************************************************************

TASK [transfer PD leader to another PD server when enable_tls|default(false)] ***********************************************************************************************************************************************************

TASK [wait for transfering PD leader] ***************************************************************************************************************************************************************************************************

TASK [check current PD leader] **********************************************************************************************************************************************************************************************************

TASK [check current PD leader when enable_tls|default(false)] ***************************************************************************************************************************************************************************

TASK [stop PD by supervise] *************************************************************************************************************************************************************************************************************

TASK [stop PD by systemd] ***************************************************************************************************************************************************************************************************************
fatal: [10.91.0.214]: FAILED! => {“changed”: false, “msg”: “Could not find the requested service pd-2379.service: host”}

NO MORE HOSTS LEFT **********************************************************************************************************************************************************************************************************************
to retry, use: --limit @/home/tidb/tidb-ansible-3.0.0/retry_files/rolling_update.retry

PLAY RECAP ******************************************************************************************************************************************************************************************************************************
10.91.0.113 : ok=8 changed=0 unreachable=0 failed=0
10.91.0.196 : ok=8 changed=0 unreachable=0 failed=0
10.91.0.214 : ok=21 changed=1 unreachable=0 failed=1
10.91.0.68 : ok=9 changed=1 unreachable=0 failed=0
10.91.0.87 : ok=8 changed=0 unreachable=0 failed=0
10.91.0.94 : ok=9 changed=1 unreachable=0 failed=0
localhost : ok=1 changed=0 unreachable=0 failed=0

ERROR MESSAGE SUMMARY *******************************************************************************************************************************************************************************************************************
[10.91.0.214]: Ansible FAILED! => playbook: rolling_update.yml; TASK: stop PD by systemd; message: {“changed”: false, “msg”: “Could not find the requested service pd-2379.service: host”}
Ask for help:
Contact us: support@pingcap.com
It seems that you encounter some problems. You can send an email to the above email address, attached with the tidb-ansible/inventory.ini and tidb-ansible/log/ansible.log files and the error message, or new issue on https://github.com/pingcap/tidb-ansible/issues. We’ll try our best to help you deploy a TiDB cluster. Thanks. :slight_smile:

请问是哪里的配置文件需要更改么,让ansible 知道 pd的真正的服务名字。

2.1 升级 3.0 用这个文件 excessive_rolling_update.yml

好的明白

此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。