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

untar fails when running on Mac #573

Open fketelaars opened 8 months ago

fketelaars commented 8 months ago

Describe the bug When installing the ibm-pak oc plugin on a Mac, the unarchive role fails because the tar.gz file has files owned by a non-existing user.

Wednesday 25 October 2023  13:44:20 +0000 (0:00:00.081)       0:02:28.675 *****
fatal: [localhost]: FAILED! => {"changed": false, "dest": "/Users/sametkilictas/cpd-status/downloads", "extract_results": {"cmd": ["/usr/bin/gtar", "--extract", "-C", "/Users/sametkilictas/cpd-status/downloads", "-z", "-f", "/Users/sametkilictas/cpd-status/tmp/ansible-tmp-1698241460.4334564-4145-170659116108021/source"], "err": "/usr/bin/gtar: LICENSE: Cannot change ownership to uid 2000, gid 2000: Operation not permitted\n/usr/bin/gtar: oc-ibm_pak-linux-amd64: Cannot change ownership to uid 2000, gid 2000: Operation not permitted\n/usr/bin/gtar: Exiting with failure status due to previous errors\n", "out": "", "rc": 2}, "gid": 65534, "group": "nobody", "handler": "TgzArchive", "mode": "0755", "msg": "failed to unpack /Users/sametkilictas/cpd-status/tmp/ansible-tmp-1698241460.4334564-4145-170659116108021/source to /Users/sametkilictas/cpd-status/downloads", "owner": "root", "size": 256, "src": "/Users/sametkilictas/cpd-status/tmp/ansible-tmp-1698241460.4334564-4145-170659116108021/source", "state": "directory", "uid": 0}

Solution: ibm-pak no longer needs to be downloaded/installed as it is already in the olm-utils-v2 image.

sametkilictas commented 8 months ago

I was going to raise the issue and saw this. @fketelaars thanks for proactively creating this. I will watch the situation. As a comment, the problem is more bigger then just ibm-pak part of the progress. It fails in many more components during the deployer progress and all related to similar flavor

agiagoulas commented 7 months ago

I think I´m encountering the same issue on the step TASK [cp4ba-core : Extract installation repository] with the following error message. I´m running the latest cloud-pak-deployer as a podman container on an intel mac.

"err": "/usr/bin/gtar: ibm-cp-automation/LICENSE: Cannot change ownership to uid 0, gid 0: Operation not permitted\n/usr/bin/gtar: ibm-cp-automation/README.md: Cannot change ownership to uid 0, gid 0: Operation not permitted\n/usr/bin/gtar: ibm-cp-automation/case.yaml: Cannot change ownership to uid 0, gid 0: Operation not permitted\n/usr/bin/gtar: ibm-cp-automation/certifications/files/ExternalSecurityReport.pdf: Cannot change ownership to uid 0, gid 0: Operation not permitted\n/usr/bin/gtar: and so on

agiagoulas commented 7 months ago

Running CPD on CentOS instead of macOS fixes the issue.

israel-a-vizcarra commented 4 months ago

This might be related to the rootless podman in macbook installations. It can be solved by setting this env variable

export OLM_UTILS_LAUNCH_ARGS=" --platform linux/arm64 --userns=keep-id:uid=1001"

Note: platform parameter here is for M1 architecture