IBM / cloud-pak-deployer

Configuration-based installation of OpenShift and Cloud Pak for Data/Integration/Watson AIOps on various private and public cloud infrastructure providers. Deployment attempts to achieve the end-state defined in the configuration. If something fails along the way, you only need to restart the process to continue the deployment.
https://ibm.github.io/cloud-pak-deployer/
Apache License 2.0
130 stars 65 forks source link

Download fails for CP4D 4.8.1 #651

Closed fketelaars closed 4 months ago

fketelaars commented 4 months ago

Describe the bug When running cp-deploy.sh env download, the download fails with the following error:

TASK [cp4d-case-save : Download case files, logs are in /root/Data/cpd-mirror-status/log/mirror-images-case-save-ibm-pak.log] ***
Wednesday 28 February 2024  11:06:58 +0000 (0:00:00.414)       0:01:12.522 **** 
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "HOME=/tmp/work/offline/4.8.1 && /root/Data/cpd-mirror-status/cp4d/mirror-images-case-save-ibm-pak.sh > /root/Data/cpd-mirror-status/log/mirror-images-case-save-ibm-pak.log\n", "delta": "0:00:30.194408", "end": "2024-02-28 11:07:28.344754", "msg": "non-zero return code", "rc": 1, "start": "2024-02-28 11:06:58.150346", "stderr": "mv: cannot move '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-cp-common-services/4.3.0' to a subdirectory of itself, '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-cp-common-services/4.3.0/4.3.0'\nmv: cannot move '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-elasticsearch-operator/1.1.1845' to a subdirectory of itself, '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-elasticsearch-operator/1.1.1845/1.1.1845'\nmv: cannot move '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-ccs/8.1.0' to a subdirectory of itself, '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-ccs/8.1.0/8.1.0'\nmv: cannot move '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-wsl-runtimes/8.1.0' to a subdirectory of itself, '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-wsl-runtimes/8.1.0/8.1.0'\nmv: cannot move '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-datarefinery/8.1.0' to a subdirectory of itself, '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-datarefinery/8.1.0/8.1.0'\nmv: cannot move '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-datastage-enterprise/7.1.0' to a subdirectory of itself, '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-datastage-enterprise/7.1.0/7.1.0'\nmv: cannot move '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-wml-cpd/8.1.0' to a subdirectory of itself, '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-wml-cpd/8.1.0/8.1.0'\nmv: cannot move '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-wsl/8.1.0' to a subdirectory of itself, '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-wsl/8.1.0/8.1.0'", "stderr_lines": ["mv: cannot move '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-cp-common-services/4.3.0' to a subdirectory of itself, '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-cp-common-services/4.3.0/4.3.0'", "mv: cannot move '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-elasticsearch-operator/1.1.1845' to a subdirectory of itself, '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-elasticsearch-operator/1.1.1845/1.1.1845'", "mv: cannot move '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-ccs/8.1.0' to a subdirectory of itself, '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-ccs/8.1.0/8.1.0'", "mv: cannot move '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-wsl-runtimes/8.1.0' to a subdirectory of itself, '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-wsl-runtimes/8.1.0/8.1.0'", "mv: cannot move '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-datarefinery/8.1.0' to a subdirectory of itself, '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-datarefinery/8.1.0/8.1.0'", "mv: cannot move '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-datastage-enterprise/7.1.0' to a subdirectory of itself, '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-datastage-enterprise/7.1.0/7.1.0'", "mv: cannot move '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-wml-cpd/8.1.0' to a subdirectory of itself, '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-wml-cpd/8.1.0/8.1.0'", "mv: cannot move '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-wsl/8.1.0' to a subdirectory of itself, '/tmp/work/offline/4.8.1/.ibm-pak/data/cases/ibm-wsl/8.1.0/8.1.0'"], "stdout": "", "stdout_lines": []}

The mv statements fail when the from and to directories are the same.

Solution There is not really an elegant solution so decided to specify failed_when: False on the shell task.