From 61def281d077f88051d1b1a14dfdbfabac036c8c Mon Sep 17 00:00:00 2001 From: Sergei Chekanov Date: Tue, 2 Mar 2021 17:23:23 +0300 Subject: [PATCH] Fix error when github return 302 -L for curl: If the server reports that the requested page has moved to a different location (indicated with a Location: header and a 3XX response code), this option will make curl redo the request on the new place It fixes build error for me: INFO:kolla.common.utils.prometheus-v2-server: ---> Running in 693fd4095c77 INFO:kolla.common.utils.prometheus-v2-server:curl (https://github.com/prometheus/prometheus/releases/download/v2.23.0/prometheus-2.23.0.linux-amd64.tar.gz): response: 302, time: 0.166583, size: 640 INFO:kolla.common.utils.prometheus-v2-server: INFO:kolla.common.utils.prometheus-v2-server:gzip: stdin: not in gzip format INFO:kolla.common.utils.prometheus-v2-server: INFO:kolla.common.utils.prometheus-v2-server:tar: Child returned status 1 INFO:kolla.common.utils.prometheus-v2-server:tar: Error is not recoverable: exiting now Change-Id: I095ca6f34cc7c7bca485e9ec019cc52aeb8e3ff4 --- docker/base/Dockerfile.j2 | 2 +- docker/prometheus/prometheus-alertmanager/Dockerfile.j2 | 2 +- docker/prometheus/prometheus-blackbox-exporter/Dockerfile.j2 | 2 +- docker/prometheus/prometheus-cadvisor/Dockerfile.j2 | 2 +- .../prometheus/prometheus-elasticsearch-exporter/Dockerfile.j2 | 2 +- docker/prometheus/prometheus-haproxy-exporter/Dockerfile.j2 | 2 +- docker/prometheus/prometheus-memcached-exporter/Dockerfile.j2 | 2 +- docker/prometheus/prometheus-mysqld-exporter/Dockerfile.j2 | 2 +- docker/prometheus/prometheus-node-exporter/Dockerfile.j2 | 2 +- docker/prometheus/prometheus-openstack-exporter/Dockerfile.j2 | 2 +- docker/prometheus/prometheus-server/Dockerfile.j2 | 2 +- docker/prometheus/prometheus-v2-server/Dockerfile.j2 | 2 +- docker/skydive/skydive-base/Dockerfile.j2 | 2 +- docker/zun/zun-cni-daemon/Dockerfile.j2 | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index 2af50509fb..7bd9710b7c 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -415,7 +415,7 @@ COPY curlrc /root/.curlrc {% block dumb_init_installation %} -RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_{{debian_arch}} -o /usr/local/bin/dumb-init \ +RUN curl -Lo /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_{{debian_arch}} \ && chmod +x /usr/local/bin/dumb-init {% endblock %} diff --git a/docker/prometheus/prometheus-alertmanager/Dockerfile.j2 b/docker/prometheus/prometheus-alertmanager/Dockerfile.j2 index 23db875556..bb82be8a9b 100644 --- a/docker/prometheus/prometheus-alertmanager/Dockerfile.j2 +++ b/docker/prometheus/prometheus-alertmanager/Dockerfile.j2 @@ -10,7 +10,7 @@ ENV prometheus_alertmanager_version=0.20.0 {% endblock %} {% block prometheus_alertmanager_install %} -RUN curl -o /tmp/prometheus_alertmanager.tar.gz https://github.com/prometheus/alertmanager/releases/download/v${prometheus_alertmanager_version}/alertmanager-${prometheus_alertmanager_version}.linux-{{debian_arch}}.tar.gz \ +RUN curl -Lo /tmp/prometheus_alertmanager.tar.gz https://github.com/prometheus/alertmanager/releases/download/v${prometheus_alertmanager_version}/alertmanager-${prometheus_alertmanager_version}.linux-{{debian_arch}}.tar.gz \ && tar xvf /tmp/prometheus_alertmanager.tar.gz -C /opt/ \ && rm -f /tmp/prometheus_alertmanager.tar.gz \ && ln -s /opt/alertmanager* /opt/prometheus_alertmanager diff --git a/docker/prometheus/prometheus-blackbox-exporter/Dockerfile.j2 b/docker/prometheus/prometheus-blackbox-exporter/Dockerfile.j2 index df22f46d89..eaa4e95a00 100644 --- a/docker/prometheus/prometheus-blackbox-exporter/Dockerfile.j2 +++ b/docker/prometheus/prometheus-blackbox-exporter/Dockerfile.j2 @@ -24,7 +24,7 @@ ENV blackbox_exporter_version=0.16.0 {{ macros.install_packages(blackbox_packages | customizable("packages")) }} {% block prometheus_blackbox_exporter_install %} -RUN curl -o /tmp/blackbox_exporter.tar.gz https://github.com/prometheus/blackbox_exporter/releases/download/v${blackbox_exporter_version}/blackbox_exporter-${blackbox_exporter_version}.linux-{{debian_arch}}.tar.gz \ +RUN curl -Lo /tmp/blackbox_exporter.tar.gz https://github.com/prometheus/blackbox_exporter/releases/download/v${blackbox_exporter_version}/blackbox_exporter-${blackbox_exporter_version}.linux-{{debian_arch}}.tar.gz \ && tar xvf /tmp/blackbox_exporter.tar.gz -C /opt/ \ && rm -f /tmp/blackbox_exporter.tar.gz \ && ln -s /opt/blackbox_exporter* /opt/blackbox_exporter diff --git a/docker/prometheus/prometheus-cadvisor/Dockerfile.j2 b/docker/prometheus/prometheus-cadvisor/Dockerfile.j2 index 53bd6b7cf4..6ef407dda9 100644 --- a/docker/prometheus/prometheus-cadvisor/Dockerfile.j2 +++ b/docker/prometheus/prometheus-cadvisor/Dockerfile.j2 @@ -14,7 +14,7 @@ ENV prometheus_cadvisor_version=0.35.0 {% if base_arch in ['x86_64'] %} {% block prometheus_cadvisor_install %} -RUN curl -o /opt/cadvisor https://github.com/google/cadvisor/releases/download/v${prometheus_cadvisor_version}/cadvisor && chmod 0755 /opt/cadvisor +RUN curl -Lo /opt/cadvisor https://github.com/google/cadvisor/releases/download/v${prometheus_cadvisor_version}/cadvisor && chmod 0755 /opt/cadvisor {% endblock %} {% else %} diff --git a/docker/prometheus/prometheus-elasticsearch-exporter/Dockerfile.j2 b/docker/prometheus/prometheus-elasticsearch-exporter/Dockerfile.j2 index a06f19cb40..1f23fda6a8 100644 --- a/docker/prometheus/prometheus-elasticsearch-exporter/Dockerfile.j2 +++ b/docker/prometheus/prometheus-elasticsearch-exporter/Dockerfile.j2 @@ -10,7 +10,7 @@ ENV elasticsearch_exporter_version=1.1.0 {% endblock %} {% block prometheus_elasticsearch_exporter_install %} -RUN curl -o /tmp/elasticsearch_exporter.tar.gz https://github.com/justwatchcom/elasticsearch_exporter/releases/download/v${elasticsearch_exporter_version}/elasticsearch_exporter-${elasticsearch_exporter_version}.linux-{{debian_arch}}.tar.gz \ +RUN curl -Lo /tmp/elasticsearch_exporter.tar.gz https://github.com/justwatchcom/elasticsearch_exporter/releases/download/v${elasticsearch_exporter_version}/elasticsearch_exporter-${elasticsearch_exporter_version}.linux-{{debian_arch}}.tar.gz \ && tar xvf /tmp/elasticsearch_exporter.tar.gz -C /opt/ \ && rm -f /tmp/elasticsearch_exporter.tar.gz \ && ln -s /opt/elasticsearch_exporter* /opt/elasticsearch_exporter diff --git a/docker/prometheus/prometheus-haproxy-exporter/Dockerfile.j2 b/docker/prometheus/prometheus-haproxy-exporter/Dockerfile.j2 index 0242b16ef0..2f7bc19d71 100644 --- a/docker/prometheus/prometheus-haproxy-exporter/Dockerfile.j2 +++ b/docker/prometheus/prometheus-haproxy-exporter/Dockerfile.j2 @@ -10,7 +10,7 @@ ENV haproxy_exporter_version=0.10.0 {% endblock %} {% block haproxy_exporter_install %} -RUN curl -o /tmp/haproxy_exporter.tar.gz https://github.com/prometheus/haproxy_exporter/releases/download/v${haproxy_exporter_version}/haproxy_exporter-${haproxy_exporter_version}.linux-{{debian_arch}}.tar.gz \ +RUN curl -Lo /tmp/haproxy_exporter.tar.gz https://github.com/prometheus/haproxy_exporter/releases/download/v${haproxy_exporter_version}/haproxy_exporter-${haproxy_exporter_version}.linux-{{debian_arch}}.tar.gz \ && tar xvf /tmp/haproxy_exporter.tar.gz -C /opt/ \ && rm -f /tmp/haproxy_exporter.tar.gz \ && ln -s /opt/haproxy_exporter* /opt/haproxy_exporter diff --git a/docker/prometheus/prometheus-memcached-exporter/Dockerfile.j2 b/docker/prometheus/prometheus-memcached-exporter/Dockerfile.j2 index 66edaf5cb5..032ced3e37 100644 --- a/docker/prometheus/prometheus-memcached-exporter/Dockerfile.j2 +++ b/docker/prometheus/prometheus-memcached-exporter/Dockerfile.j2 @@ -10,7 +10,7 @@ ENV memcached_exporter_version=0.6.0 {% endblock %} {% block prometheus_memcached_exporter_install %} -RUN curl -o /tmp/memcached_exporter.tar.gz https://github.com/prometheus/memcached_exporter/releases/download/v${memcached_exporter_version}/memcached_exporter-${memcached_exporter_version}.linux-{{debian_arch}}.tar.gz \ +RUN curl -Lo /tmp/memcached_exporter.tar.gz https://github.com/prometheus/memcached_exporter/releases/download/v${memcached_exporter_version}/memcached_exporter-${memcached_exporter_version}.linux-{{debian_arch}}.tar.gz \ && tar xvf /tmp/memcached_exporter.tar.gz -C /opt/ \ && rm -f /tmp/memcached_exporter.tar.gz \ && ln -s /opt/memcached_exporter* /opt/memcached_exporter diff --git a/docker/prometheus/prometheus-mysqld-exporter/Dockerfile.j2 b/docker/prometheus/prometheus-mysqld-exporter/Dockerfile.j2 index c8f77ee079..ee7656ff5f 100644 --- a/docker/prometheus/prometheus-mysqld-exporter/Dockerfile.j2 +++ b/docker/prometheus/prometheus-mysqld-exporter/Dockerfile.j2 @@ -10,7 +10,7 @@ ENV mysqld_exporter_version=0.12.1 {% endblock %} {% block mysqld_exporter_install %} -RUN curl -o /tmp/mysqld_exporter.tar.gz https://github.com/prometheus/mysqld_exporter/releases/download/v${mysqld_exporter_version}/mysqld_exporter-${mysqld_exporter_version}.linux-{{debian_arch}}.tar.gz \ +RUN curl -Lo /tmp/mysqld_exporter.tar.gz https://github.com/prometheus/mysqld_exporter/releases/download/v${mysqld_exporter_version}/mysqld_exporter-${mysqld_exporter_version}.linux-{{debian_arch}}.tar.gz \ && tar xvf /tmp/mysqld_exporter.tar.gz -C /opt/ \ && rm -f /tmp/mysqld_exporter.tar.gz \ && ln -s /opt/mysqld_exporter* /opt/mysqld_exporter diff --git a/docker/prometheus/prometheus-node-exporter/Dockerfile.j2 b/docker/prometheus/prometheus-node-exporter/Dockerfile.j2 index ce780f809d..b4ee143085 100644 --- a/docker/prometheus/prometheus-node-exporter/Dockerfile.j2 +++ b/docker/prometheus/prometheus-node-exporter/Dockerfile.j2 @@ -10,7 +10,7 @@ ENV node_exporter_version=0.18.1 {% endblock %} {% block node_exporter_install %} -RUN curl -o /tmp/node_exporter.tar.gz https://github.com/prometheus/node_exporter/releases/download/v${node_exporter_version}/node_exporter-${node_exporter_version}.linux-{{debian_arch}}.tar.gz \ +RUN curl -Lo /tmp/node_exporter.tar.gz https://github.com/prometheus/node_exporter/releases/download/v${node_exporter_version}/node_exporter-${node_exporter_version}.linux-{{debian_arch}}.tar.gz \ && tar xvf /tmp/node_exporter.tar.gz -C /opt/ \ && rm -f /tmp/node_exporter.tar.gz \ && ln -s /opt/node_exporter* /opt/node_exporter diff --git a/docker/prometheus/prometheus-openstack-exporter/Dockerfile.j2 b/docker/prometheus/prometheus-openstack-exporter/Dockerfile.j2 index 0150e1d6c7..c14fd9d848 100644 --- a/docker/prometheus/prometheus-openstack-exporter/Dockerfile.j2 +++ b/docker/prometheus/prometheus-openstack-exporter/Dockerfile.j2 @@ -10,7 +10,7 @@ ENV prometheus_openstack_exporter_version=1.3.0 {% endblock %} {% block prometheus_openstack_exporter_install %} -RUN curl -o /tmp/prometheus_openstack_exporter.tar.gz https://github.com/openstack-exporter/openstack-exporter/releases/download/v${prometheus_openstack_exporter_version}/openstack-exporter-${prometheus_openstack_exporter_version}.linux-{{debian_arch}}.tar.gz \ +RUN curl -Lo /tmp/prometheus_openstack_exporter.tar.gz https://github.com/openstack-exporter/openstack-exporter/releases/download/v${prometheus_openstack_exporter_version}/openstack-exporter-${prometheus_openstack_exporter_version}.linux-{{debian_arch}}.tar.gz \ && tar xvf /tmp/prometheus_openstack_exporter.tar.gz -C /opt/ \ && rm -f /tmp/prometheus_openstack_exporter.tar.gz \ && ln -s /opt/openstack-exporter* /opt/openstack-exporter diff --git a/docker/prometheus/prometheus-server/Dockerfile.j2 b/docker/prometheus/prometheus-server/Dockerfile.j2 index e01fe2d7a7..1a1bf89b78 100644 --- a/docker/prometheus/prometheus-server/Dockerfile.j2 +++ b/docker/prometheus/prometheus-server/Dockerfile.j2 @@ -10,7 +10,7 @@ ENV prometheus_version=1.8.2 {% endblock %} {% block prometheus_server_install %} -RUN curl -o /tmp/prometheus.tar.gz https://github.com/prometheus/prometheus/releases/download/v${prometheus_version}/prometheus-${prometheus_version}.linux-{{debian_arch}}.tar.gz \ +RUN curl -Lo /tmp/prometheus.tar.gz https://github.com/prometheus/prometheus/releases/download/v${prometheus_version}/prometheus-${prometheus_version}.linux-{{debian_arch}}.tar.gz \ && tar xvf /tmp/prometheus.tar.gz -C /opt/ \ && rm -f /tmp/prometheus.tar.gz \ && ln -s /opt/prometheus* /opt/prometheus \ diff --git a/docker/prometheus/prometheus-v2-server/Dockerfile.j2 b/docker/prometheus/prometheus-v2-server/Dockerfile.j2 index 6b12f27c1d..acf8356476 100644 --- a/docker/prometheus/prometheus-v2-server/Dockerfile.j2 +++ b/docker/prometheus/prometheus-v2-server/Dockerfile.j2 @@ -10,7 +10,7 @@ ENV prometheus_version=2.23.0 {% endblock %} {% block prometheus_v2_server_install %} -RUN curl -o /tmp/prometheus.tar.gz https://github.com/prometheus/prometheus/releases/download/v${prometheus_version}/prometheus-${prometheus_version}.linux-{{debian_arch}}.tar.gz \ +RUN curl -Lo /tmp/prometheus.tar.gz https://github.com/prometheus/prometheus/releases/download/v${prometheus_version}/prometheus-${prometheus_version}.linux-{{debian_arch}}.tar.gz \ && tar xvf /tmp/prometheus.tar.gz -C /opt/ \ && rm -f /tmp/prometheus.tar.gz \ && ln -s /opt/prometheus* /opt/prometheus \ diff --git a/docker/skydive/skydive-base/Dockerfile.j2 b/docker/skydive/skydive-base/Dockerfile.j2 index b75efd7a45..8542f51986 100644 --- a/docker/skydive/skydive-base/Dockerfile.j2 +++ b/docker/skydive/skydive-base/Dockerfile.j2 @@ -15,7 +15,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build RUN echo 'image on {{ base_distro }} is not yet available on non x86_64 platforms' \ && /bin/false {% else %} -RUN curl -o /usr/bin/skydive "https://github.com/skydive-project/skydive/releases/download/v0.26.0/skydive" \ +RUN curl -Lo /usr/bin/skydive "https://github.com/skydive-project/skydive/releases/download/v0.26.0/skydive" \ && chmod +x /usr/bin/skydive {% endif %} diff --git a/docker/zun/zun-cni-daemon/Dockerfile.j2 b/docker/zun/zun-cni-daemon/Dockerfile.j2 index beaa6ec60b..908b68be20 100644 --- a/docker/zun/zun-cni-daemon/Dockerfile.j2 +++ b/docker/zun/zun-cni-daemon/Dockerfile.j2 @@ -36,7 +36,7 @@ COPY zun_sudoers /etc/sudoers.d/kolla_zun_sudoers RUN chmod 750 /etc/sudoers.d \ && chmod 640 /etc/sudoers.d/kolla_zun_sudoers -RUN curl -o /tmp/cni-plugins-v0.7.1.tgz https://github.com/containernetworking/plugins/releases/download/v0.7.1/cni-plugins-amd64-v0.7.1.tgz \ +RUN curl -Lo /tmp/cni-plugins-v0.7.1.tgz https://github.com/containernetworking/plugins/releases/download/v0.7.1/cni-plugins-amd64-v0.7.1.tgz \ && tar -C /opt -xzvf /tmp/cni-plugins-v0.7.1.tgz ./loopback \ && rm -f /tmp/cni-plugins-v0.7.1.tgz