From 8187a83259bf00994460ad127e72152e27875990 Mon Sep 17 00:00:00 2001 From: Derek Higgins Date: Tue, 20 Mar 2018 11:38:18 +0000 Subject: [PATCH] Disable curl globbing Disable curl globbing to allow Swift ringbuilder to upload to IPv6 upload addresses. Also dicable globbing in the other places curl is used. Change-Id: Iba51cc75bea26b775f790849f0b466a6528ee627 Closes-Bug: #1757118 --- manifests/certmonger/ca/crl.pp | 2 +- manifests/profile/base/swift/ringbuilder.pp | 4 ++-- spec/classes/tripleo_certmonger_ca_crl_spec.rb | 4 ++-- templates/redis/redis-notifications.sh.erb | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/manifests/certmonger/ca/crl.pp b/manifests/certmonger/ca/crl.pp index f62025715..e1d8072c5 100644 --- a/manifests/certmonger/ca/crl.pp +++ b/manifests/certmonger/ca/crl.pp @@ -129,7 +129,7 @@ class tripleo::certmonger::ca::crl ( if $ensure == 'present' { # Fetch CRL in cron job and notify needed services - $cmd_list = concat(["${sleep}curl -s -L -o ${fetched_crl} ${crl_source}"], $process_cmd, $reload_cmds) + $cmd_list = concat(["${sleep}curl -g -s -L -o ${fetched_crl} ${crl_source}"], $process_cmd, $reload_cmds) $cron_cmd = join($cmd_list, ' && ') } else { $cron_cmd = absent diff --git a/manifests/profile/base/swift/ringbuilder.pp b/manifests/profile/base/swift/ringbuilder.pp index 3c7b8df90..fa37a91dd 100644 --- a/manifests/profile/base/swift/ringbuilder.pp +++ b/manifests/profile/base/swift/ringbuilder.pp @@ -92,7 +92,7 @@ class tripleo::profile::base::swift::ringbuilder ( if $step >= 2 and $swift_ring_get_tempurl != '' { exec{'fetch_swift_ring_tarball': path => ['/usr/bin'], - command => "curl --insecure --silent --retry 3 '${swift_ring_get_tempurl}' -o /tmp/swift-rings.tar.gz", + command => "curl -g --insecure --silent --retry 3 '${swift_ring_get_tempurl}' -o /tmp/swift-rings.tar.gz", returns => [0, 3], timeout => 30, tries => 3, @@ -157,7 +157,7 @@ class tripleo::profile::base::swift::ringbuilder ( } exec{'upload_swift_ring_tarball': path => ['/usr/bin'], - command => "curl --insecure --silent --retry 3 -X PUT '${$swift_ring_put_tempurl}' --data-binary @/tmp/swift-rings.tar.gz", + command => "curl -g --insecure --silent --retry 3 -X PUT '${$swift_ring_put_tempurl}' --data-binary @/tmp/swift-rings.tar.gz", require => Exec['create_swift_ring_tarball'], refreshonly => true, timeout => 30, diff --git a/spec/classes/tripleo_certmonger_ca_crl_spec.rb b/spec/classes/tripleo_certmonger_ca_crl_spec.rb index 29726f126..d557a1bc7 100644 --- a/spec/classes/tripleo_certmonger_ca_crl_spec.rb +++ b/spec/classes/tripleo_certmonger_ca_crl_spec.rb @@ -47,7 +47,7 @@ describe 'tripleo::certmonger::ca::crl' do end let :cron_cmd do - "curl -s -L -o #{params[:crl_preprocessed]} #{params[:crl_source]} && #{process_cmd}" + "curl -g -s -L -o #{params[:crl_preprocessed]} #{params[:crl_source]} && #{process_cmd}" end it 'should create and process CRL file' do @@ -75,7 +75,7 @@ describe 'tripleo::certmonger::ca::crl' do end let :cron_cmd do - "curl -s -L -o #{params[:crl_dest]} #{params[:crl_source]}" + "curl -g -s -L -o #{params[:crl_dest]} #{params[:crl_source]}" end it 'should create and process CRL file' do diff --git a/templates/redis/redis-notifications.sh.erb b/templates/redis/redis-notifications.sh.erb index aa368e9fa..1c01763f4 100644 --- a/templates/redis/redis-notifications.sh.erb +++ b/templates/redis/redis-notifications.sh.erb @@ -7,7 +7,7 @@ ARG1=`echo $ARGS | awk '{print $1}'` call_curl () { DATA=`echo "s=$1&action=$2&b=%234" | sed -e s/:/%3A/` - curl --silent -o /dev/null $HAPROXY --data "$DATA" + curl -g --silent -o /dev/null $HAPROXY --data "$DATA" echo curl $HAPROXY --data "$DATA" return 0 }