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 defined, and not empty. Task: 29863 Change-Id: Id05c90d5bf99d720ae6002b38d3291e364e1e0c4
This commit is contained in:
parent
90dfeaa491
commit
2595fda3e3
|
@ -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=''
|
||||
|
|
|
@ -4,6 +4,18 @@
|
|||
|
||||
set -uxe
|
||||
|
||||
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
|
||||
|
||||
# Create a keypair for the heat-container-agent to
|
||||
# access the node over ssh. It is useful to operate
|
||||
# in host mount namespace and apply configuration.
|
||||
|
|
Loading…
Reference in New Issue