quipucords/qpc-tools

Can not use relative paths in volume mappings with podman

Closed this issue · 0 comments

ansible-playbook qpc_playbook.yml -vv -e install_offline=true -e server_version=0.9.1 -e cli_version=0.9.1 -e server_install_dir=cody 

TASK [server_podman : Start Quipucords server Podman container linked to PostgreSQL container] ***********************************************************************************************************************************************
task path: /qpc_tools/install/roles/server_podman/tasks/start_quipucords_container.yml:55
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "podman run --name quipucords -p 9443:443 -d -e USE_SUPERVISORD=true -e QPC_SERVER_TIMEOUT=120 -e QPC_DBMS_USER=postgres -e QPC_DBMS_PASSWORD=password -e ANSIBLE_LOG_LEVEL=0 -e NETWORK_CONNECT_JOB_TIMEOUT=600 -e NETWORK_INSPECT_JOB_TIMEOUT=10800 -e QPC_SERVER_USERNAME=admin -e QPC_SERVER_USER_EMAIL=admin@example.com -e QPC_SERVER_PASSWORD=qpcpassw0rd -v cody/server/volumes/sshkeys/:/sshkeys:z -v cody/server/volumes/data/:/var/data:z -v cody/server/volumes/log/:/var/log:z -i quipucords:0.9.1", "delta": "0:00:00.081378", "end": "2019-09-26 13:58:46.982771", "msg": "non-zero return code", "rc": 125, "start": "2019-09-26 13:58:46.901393", "stderr": "Error: error creating named volume \"cody/server/volumes/data/\": error running volume create option: names must match [a-zA-Z0-9][a-zA-Z0-9_.-]*: invalid argument", "stderr_lines": ["Error: error creating named volume \"cody/server/volumes/data/\": error running volume create option: names must match [a-zA-Z0-9][a-zA-Z0-9_.-]*: invalid argument"], "stdout": "", "stdout_lines": []}
...ignoring

[root@vrhel7 install]# ls
cody  packages  qpc_playbook.yml  qpc-tools  roles

So, if you pass in a relative path for the server_install_dir, the directory will be created with the correct subdirectory infrastructure at the correct relative path location and the files will be correctly passed over. However, podman does not allow you to pass in relative paths in the volume mappings. So you can't do:

-v relative_path:absolute_path

Convert any relative paths passed in for server_install_dir are converted to absolute paths.