ESGF / esgf-ansible

A repository to hold Ansible inventory, playbooks, roles and tasks that specify the details of ESGF Node deployments.
3 stars 10 forks source link

temporary files and directories (/tmp/esgf-config) #107

Closed SebastienGardoll closed 5 years ago

SebastienGardoll commented 5 years ago

Describe the bug

While upgrading an idp, an index and a data node from version 4.0.2 to 4.0.3 on machines that have never been rebooted since the last update (to version 4.0.2), esgf-ansible fails to upgrade because /tmp/esgf-config exists and is not empty. Full log of the upgrade is attached. Deleting this directory fixes the problem. upgrade.log

To Reproduce Steps to reproduce the behavior:

  1. Run installer with options: INVENTORY var contains the informations for an idp, an index and a data node. ansible-playbook -i ${INVENTORY} -u root --skip-tags gridftp install.yml

  2. See error

TASK [base : Create config directory] *****************************************************************************************************************************************************************************
ok: [vesgint-data.ipsl.upmc.fr]
ok: [vesgint-idx.ipsl.upmc.fr]
/home/esgf-watch-dog/miniconda2/envs/ansible/lib/python3.6/site-packages/paramiko/ecdsakey.py:164: CryptographyDeprecationWarning: Support for unsafe construction of public numbers from encoded data will be removed in a future version. Please use EllipticCurvePublicKey.from_encoded_point
  self.ecdsa_curve.curve_class(), pointinfo
/home/esgf-watch-dog/miniconda2/envs/ansible/lib/python3.6/site-packages/paramiko/ecdsakey.py:164: CryptographyDeprecationWarning: Support for unsafe construction of public numbers from encoded data will be removed in a future version. Please use EllipticCurvePublicKey.from_encoded_point
  self.ecdsa_curve.curve_class(), pointinfo

TASK [base : Install properties] **********************************************************************************************************************************************************************************
ok: [vesgint-data.ipsl.upmc.fr]
ok: [vesgint-idx.ipsl.upmc.fr]
/home/esgf-watch-dog/miniconda2/envs/ansible/lib/python3.6/site-packages/paramiko/ecdsakey.py:164: CryptographyDeprecationWarning: Support for unsafe construction of public numbers from encoded data will be removed in a future version. Please use EllipticCurvePublicKey.from_encoded_point
  self.ecdsa_curve.curve_class(), pointinfo
/home/esgf-watch-dog/miniconda2/envs/ansible/lib/python3.6/site-packages/paramiko/ecdsakey.py:164: CryptographyDeprecationWarning: Support for unsafe construction of public numbers from encoded data will be removed in a future version. Please use EllipticCurvePublicKey.from_encoded_point
  self.ecdsa_curve.curve_class(), pointinfo

TASK [base : Install config_type] *********************************************************************************************************************************************************************************
ok: [vesgint-data.ipsl.upmc.fr]
ok: [vesgint-idx.ipsl.upmc.fr]
/home/esgf-watch-dog/miniconda2/envs/ansible/lib/python3.6/site-packages/paramiko/ecdsakey.py:164: CryptographyDeprecationWarning: Support for unsafe construction of public numbers from encoded data will be removed in a future version. Please use EllipticCurvePublicKey.from_encoded_point
  self.ecdsa_curve.curve_class(), pointinfo
/home/esgf-watch-dog/miniconda2/envs/ansible/lib/python3.6/site-packages/paramiko/ecdsakey.py:164: CryptographyDeprecationWarning: Support for unsafe construction of public numbers from encoded data will be removed in a future version. Please use EllipticCurvePublicKey.from_encoded_point
  self.ecdsa_curve.curve_class(), pointinfo

TASK [base : Clone ESGF config repository] ************************************************************************************************************************************************************************
fatal: [vesgint-data.ipsl.upmc.fr]: FAILED! => {
    "changed": false,
    "cmd": "/usr/bin/git clone --origin origin https://github.com/ESGF/config.git /tmp/esgf-config",
    "rc": 128
}

STDERR:

fatal: destination path '/tmp/esgf-config' already exists and is not an empty directory.

MSG:

fatal: destination path '/tmp/esgf-config' already exists and is not an empty directory.
fatal: [vesgint-idx.ipsl.upmc.fr]: FAILED! => {
    "changed": false,
    "cmd": "/usr/bin/git clone --origin origin https://github.com/ESGF/config.git /tmp/esgf-config",
    "rc": 128
}

STDERR:

fatal: destination path '/tmp/esgf-config' already exists and is not an empty directory.

MSG:

fatal: destination path '/tmp/esgf-config' already exists and is not an empty directory.

Expected behavior

Delete temporary files and directories before installing/upgrading or generating unique directory names in /tmp.

ESGF Node (please complete the following information):

nathanlcarlson commented 5 years ago

Hi @gardoll , thanks for the report. I had wrongly assumed it would get force overwritten as I set the force parameter to true. I am now ensuring the directory is absent prior to cloning. This will be part of the next release.