Ensure http proxy environment is available during 'atomic install' for k8s
The scripts run by cloud-init for the master and minion nodes currently
write proxy environment variables into /bin/bashrc when they are defined.
These variables will only be introduced into the running environment
when a new bash shell is started. The /bin/sh used by the fragment
scripts will ignore /etc/bashrc, so the new shells invoked per fragment
will not have the http proxy variables present. This means that the
master/minion node deployment fails when behind an http proxy.
This patch adds explicit exports for HTTP_PROXY and HTTPS_PROXY when those
variables are bith defined, and not empty.
Change-Id: Id05c90d5bf99d720ae6002b38d3291e364e1e0c4
(cherry picked from commit d6706c0c00
)
This commit is contained in:
parent
263d0788a9
commit
5d3e0eacda
|
@ -4,6 +4,18 @@
|
|||
|
||||
set -x
|
||||
|
||||
if [ ! -z "$HTTP_PROXY" ]; then
|
||||
export HTTP_PROXY
|
||||
fi
|
||||
|
||||
if [ ! -z "$HTTPS_PROXY" ]; then
|
||||
export HTTPS_PROXY
|
||||
fi
|
||||
|
||||
if [ ! -z "$NO_PROXY" ]; then
|
||||
export NO_PROXY
|
||||
fi
|
||||
|
||||
if [ -n "$ETCD_VOLUME_SIZE" ] && [ "$ETCD_VOLUME_SIZE" -gt 0 ]; then
|
||||
|
||||
attempts=60
|
||||
|
|
|
@ -4,6 +4,18 @@
|
|||
|
||||
echo "configuring kubernetes (master)"
|
||||
|
||||
if [ ! -z "$HTTP_PROXY" ]; then
|
||||
export HTTP_PROXY
|
||||
fi
|
||||
|
||||
if [ ! -z "$HTTPS_PROXY" ]; then
|
||||
export HTTPS_PROXY
|
||||
fi
|
||||
|
||||
if [ ! -z "$NO_PROXY" ]; then
|
||||
export NO_PROXY
|
||||
fi
|
||||
|
||||
_prefix=${CONTAINER_INFRA_PREFIX:-docker.io/openstackmagnum/}
|
||||
|
||||
mkdir -p /opt/cni
|
||||
|
|
|
@ -4,6 +4,18 @@
|
|||
|
||||
echo "configuring kubernetes (minion)"
|
||||
|
||||
if [ ! -z "$HTTP_PROXY" ]; then
|
||||
export HTTP_PROXY
|
||||
fi
|
||||
|
||||
if [ ! -z "$HTTPS_PROXY" ]; then
|
||||
export HTTPS_PROXY
|
||||
fi
|
||||
|
||||
if [ ! -z "$NO_PROXY" ]; then
|
||||
export NO_PROXY
|
||||
fi
|
||||
|
||||
_prefix=${CONTAINER_INFRA_PREFIX:-docker.io/openstackmagnum/}
|
||||
|
||||
_addtl_mounts=''
|
||||
|
@ -204,6 +216,11 @@ if [ "$NETWORK_DRIVER" = "flannel" ]; then
|
|||
FLANNEL_OPTIONS="$FLANNEL_OPTIONS"
|
||||
EOF
|
||||
|
||||
# Ensure external proxy is not used for the following curl
|
||||
unset HTTP_PROXY
|
||||
unset HTTPS_PROXY
|
||||
unset NO_PROXY
|
||||
|
||||
# Make sure etcd has a flannel configuration
|
||||
. $FLANNELD_CONFIG
|
||||
until curl -sf $ETCD_CURL_OPTIONS \
|
||||
|
|
|
@ -4,6 +4,18 @@
|
|||
|
||||
set -ux
|
||||
|
||||
if [ ! -z "$HTTP_PROXY" ]; then
|
||||
export HTTP_PROXY
|
||||
fi
|
||||
|
||||
if [ ! -z "$HTTPS_PROXY" ]; then
|
||||
export HTTPS_PROXY
|
||||
fi
|
||||
|
||||
if [ ! -z "$NO_PROXY" ]; then
|
||||
export NO_PROXY
|
||||
fi
|
||||
|
||||
_prefix=${CONTAINER_INFRA_PREFIX:-docker.io/openstackmagnum/}
|
||||
atomic install \
|
||||
--storage ostree \
|
||||
|
|
Loading…
Reference in New Issue