e7e5504a9e
The mix of <Location> and ProxyPass [path] <target> lead to some issue. This patch corrects them and makes the config more consistent. Until now, the last URI was actually an error page from the main galaxy website. With this change, we now hit the S3 bucket as we should, allowing ansible-galaxy to download the archive, validate its checksum, and install the intended collection/role. This patch was fully tested locally using the httpd container image, a minimal configuration adding only the needed modules and the ansible-galaxy vhost/proxy, and running ansible-galaxy directly. In addition, this patch also makes a better testing of the proxy, using cURL until we actually download the file. Since ansible galaxy will provide a file under any condition, we also assert the downloaded file is really what it should be - a plain archive. If it's a miss on S3 side, it would be a JSON. And if we get an ansible galaxy answer, that would be an HTML file. The following commands were used: Run the container: podman run --rm --security-opt label=disable \ -v ./httpd.conf:/usr/local/apache2/conf/httpd.conf:ro \ -p 8080:8080 httpd:2.4 Run ansible-galaxy while ensuring we don't rely on its own internal cache: rm -rf operator ~/.ansible/galaxy_cache/api.json ansible-galaxy collection download -vvvvvvv \ -s http://localhost:8080/ -p ./operator tripleo.operator Then, the following URI were shown in the ansible-galaxy log: http://localhost:8080/ http://localhost:8080/api http://localhost:8080/api/v2/collections/tripleo/operator/ http://localhost:8080/api/v2/collections/tripleo/operator/versions/?page_size=100 http://localhost:8080/api/v2/collections/tripleo/operator/versions/0.9.0/ Then, the actual download: http://localhost:8080/download/tripleo-operator-0.9.0.tar.gz Then the checksum validation, and eventually it ended with: Collection 'tripleo.operator:0.9.0' was downloaded successfully Change-Id: Ibfe846b59bf987df3f533802cb329e15ce83500b |
||
---|---|---|
.. | ||
conftest.py | ||
test_adns.py | ||
test_base.py | ||
test_borg_backups.py | ||
test_bridge.py | ||
test_codesearch.py | ||
test_eavesdrop.py | ||
test_etherpad.py | ||
test_gerrit.py | ||
test_gitea_lb.py | ||
test_gitea.py | ||
test_grafana.py | ||
test_graphite.py | ||
test_keycloak.py | ||
test_letsencrypt.py | ||
test_lists_k_i.py | ||
test_lists_o_o.py | ||
test_lists_opendev_org.py | ||
test_meetpad.py | ||
test_mirror-update.py | ||
test_mirror.py | ||
test_nodepool.py | ||
test_ns.py | ||
test_paste.py | ||
test_refstack.py | ||
test_registry.py | ||
test_static.py | ||
test_tracing.py | ||
test_zookeeper.py | ||
test_zuul_executor.py | ||
test_zuul_lb.py | ||
test_zuul_merger.py | ||
test_zuul_preview.py | ||
test_zuul_scheduler.py | ||
util.py |