error-handling - ansible-playbook bootstrap.yml命令中的tidb-ansible错误

标签 error-handling installation ansible disk tidb

我正尝试通过TiDB ansible安装TiDB。我指的是https://pingcap.com/docs/v1.0/op-guide/ansible-deployment/中的文档,在此过程中,我遇到以下命令ansible-playbook bootstrap.yml错误。虽然磁盘未满,但出现磁盘已满错误。请不要让我知道纠正该错误的步骤。谢谢!

    [root@fm42cephnode005 tidb-ansible-master]# df -h
    Filesystem      Size  Used Avail Use% Mounted on
    devtmpfs         94G     0   94G   0% /dev
    tmpfs            94G     0   94G   0% /dev/shm
    tmpfs            94G   12M   94G   1% /run
    tmpfs            94G     0   94G   0% /sys/fs/cgroup
    /dev/sdg5       239G  5.2G  222G   3% /
    /dev/sdg3       123G  1.8G  115G   2% /home
    /dev/sdg2      1014M  257M  758M  26% /boot
    /dev/sdg1       200M   12M  189M   6% /boot/efi
    tmpfs            19G   20K   19G   1% /run/user/42
    tmpfs            19G     0   19G   0% /run/user/0
    /dev/nvme3n1    1.5T   77M  1.4T   1% /home/tidbdeployment

[root@fm42cephnode005 tidb-ansible-master]# ansible-playbook bootstrap.yml

PLAY [initializing deployment target] **********************************************************************************************************************************************************************

TASK [check_config_static : Ensure TiDB host exists] *******************************************************************************************************************************************************

TASK [check_config_static : Ensure PD host exists] *********************************************************************************************************************************************************

TASK [check_config_static : Ensure TiKV host exists] *******************************************************************************************************************************************************

TASK [check_config_static : Check ansible_user variable] ***************************************************************************************************************************************************

TASK [check_config_static : Ensure timezone variable is set] ***********************************************************************************************************************************************

TASK [check_config_static : Close old SSH control master processes] ****************************************************************************************************************************************
ok: [localhost]

TASK [check_config_static : Check ansible version] *********************************************************************************************************************************************************

TASK [check_config_static : Check if jmespath installed] ***************************************************************************************************************************************************
changed: [localhost]

TASK [check_config_static : Check if jinja2 installed] *****************************************************************************************************************************************************
changed: [localhost]

TASK [check_config_static : Preflight check - Fail when jmespath or jinja2 isn't installed] ****************************************************************************************************************

TASK [check_config_static : Get jmespath info] *************************************************************************************************************************************************************
changed: [localhost]

TASK [check_config_static : Get jmespath version] **********************************************************************************************************************************************************
ok: [localhost]

TASK [check_config_static : Get jinja2 info] ***************************************************************************************************************************************************************
changed: [localhost]

TASK [check_config_static : Get jinja2 version] ************************************************************************************************************************************************************
ok: [localhost]

TASK [check_config_static : Preflight check - Fail when the versions of jmespath and jinja2 doesn't meet the requirements] *********************************************************************************

TASK [check_config_static : Check inventory configuration] *************************************************************************************************************************************************
changed: [localhost]

TASK [check_config_static : Preflight check - If the inventory configuration is correct] *******************************************************************************************************************

PLAY [check node config] ***********************************************************************************************************************************************************************************

TASK [pre-ansible : disk space check - fail when disk is full] *********************************************************************************************************************************************
fatal: [localhost]: FAILED! =>
  msg: |-
    The conditional check ' '100%' in disk_space_st.stdout ' failed. The error was: error while evaluating conditional ( '100%' in disk_space_st.stdout ): Unable to look up a name or access an attribute in template string ({% if  '100%' in disk_space_st.stdout  %} True {% else %} False {% endif %}).
    Make sure your variable name does not contain invalid characters like '-': argument of type 'StrictUndefined' is not iterable
        to retry, use: --limit @/home/tidb-ansible-master/retry_files/bootstrap.retry

PLAY RECAP *************************************************************************************************************************************************************************************************
localhost                  : ok=8    changed=5    unreachable=0    failed=1


ERROR MESSAGE SUMMARY **************************************************************************************************************************************************************************************
[localhost]: Ansible Failed! ==>

  msg: |-
    The conditional check ' '100%' in disk_space_st.stdout ' failed. The error was: error while evaluating conditional ( '100%' in disk_space_st.stdout ): Unable to look up a name or access an attribute in template string ({% if  '100%' in disk_space_st.stdout  %} True {% else %} False {% endif %}).
    Make sure your variable name does not contain invalid characters like '-': argument of type 'StrictUndefined' is not iterable

最佳答案

这是为了使用df -h. | tail -n1命令来确定与ansible_user中所有机器的inventory.ini对应的主目录分区的空间使用情况。发生错误时,分区使用率可能为100%。如果确认剩余空间,请重试。

关于error-handling - ansible-playbook bootstrap.yml命令中的tidb-ansible错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59186290/

相关文章:

python-3.x - 找到错误并修复。该程序将查找数组中3的倍数之和

linux - 在 linux 中安装 go 包

Ansible:从命令行覆盖 list 的 ansible_host

server - 在 Julia 上全局安装一个包

windows - Visual Studio 2012 安装限制

python - 如何以编程方式运行 ansible 播放,同时仍使用本地文件作为我的播放?

ssl - Vagrant,Ansible : SSLError bad handshake: Error SSL routines, ssl3_get_record,错误的版本号

java - 微调框出现错误: java.lang.RuntimeException: Unable to start activity ComponentInfo

firebase - 如何使用 Flutter 从 Firebase 登录打印 PlatformException 的用户可读部分?

php登录错误检查脚本与sql