0

I am trying to install TiDB through TiDB ansible. I am referring to documentation in https://pingcap.com/docs/v1.0/op-guide/ansible-deployment/ and in the process I am facing the following error for command ansible-playbook bootstrap.yml . Though the disk is not full I am getting the disk full error. Please do let me know the steps to fix the error. Thank you!

    [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
  • Hi pragathi, welcome to SO. You are not getting a "disk full error," you are getting an ansible error; without knowing exactly what version of ansible, it's hard to reproduce your error, but at least on ansible 2.9 that error does not occur, so if possible, try updating to the latest version – mdaniel Dec 05 '19 at 05:03
  • Hello Daniel, I am using ansible vesion 2.7.11. I initially installed 2.9 version and it wasnt compatible with this tidb version. Hence I had to use 2.7.11. Please do let me know if you have any ideas on how to fix the issue. Thank you – pragathi narendra Dec 06 '19 at 23:52

1 Answers1

0

This is to use the df -h. | tail -n1 command to determine the space usage of the home directory partition corresponding to the ansible_user of all machines in the inventory.ini. Partition usage may be 100% when errors occurred. If confirm that there is space left, please try again.

Bo Liu
  • 16
  • 2
  • I am trying to install TiDB on the localhost only ( hence the inventory.ini has localhost only). The df -h for tidbuser in home directory shows that the directory is only 2% utilized. However on running the same command returns the same error. Do you happen to know why? – pragathi narendra Dec 05 '19 at 17:42