Skip to content

Commit defe6b0

Browse files
authored
Merge pull request #16 from stackhpc/cacert
Use container's system CA trust store
2 parents a0f41d7 + cd5aec9 commit defe6b0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

bin/rally-verify-wrapper.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,16 @@ else
7878
fi
7979
set -x
8080

81-
unset OS_CACERT
81+
if [[ -z "$(sudo ls -A /usr/local/share/ca-certificates)" ]]; then
82+
# Assume that any CA certificate referenced in the openrc file will not be
83+
# valid within the container.
84+
unset OS_CACERT
85+
else
86+
# Use the container's system CA trust store. This allows for bind mounting a CA
87+
# certificate under /usr/local/share/ca-certificates/.
88+
sudo update-ca-certificates
89+
export OS_CACERT=/etc/ssl/certs/ca-certificates.crt
90+
fi
8291

8392
crudini --set ~/.rally/rally.conf DEFAULT openstack_client_http_timeout 300
8493
crudini --set ~/.rally/rally.conf openstack flavor_ref_ram 128

0 commit comments

Comments
 (0)