Using no proxy option to skip wget and curl proxy settings in config
When end users specify proxy settings in config file for wget /etc/wgetrc: http_proxy = http://... or for curl ${HOME}/.curlrc: proxy = http://... Using `http_proxy="" wget' can not skip the proxy setting in the config files, also it can skip proxy settings in env viriables. In order to skip proxy setting in both env and config file, we pass --no-proxy option for wget, and --noproxy '*' for curl. Fixes bug #1224836 Change-Id: I2b25aeca9edf2ce4525fb1db325e5e24c18b4d55
This commit is contained in:
parent
b48e008169
commit
0aa8534ada
@ -1484,7 +1484,7 @@ function use_exclusive_service {
|
||||
function wait_for_service() {
|
||||
local timeout=$1
|
||||
local url=$2
|
||||
timeout $timeout sh -c "while ! http_proxy= https_proxy= curl -s $url >/dev/null; do sleep 1; done"
|
||||
timeout $timeout sh -c "while ! curl --noproxy '*' -s $url >/dev/null; do sleep 1; done"
|
||||
}
|
||||
|
||||
|
||||
|
@ -193,7 +193,7 @@ function start_glance() {
|
||||
screen_it g-reg "cd $GLANCE_DIR; $GLANCE_BIN_DIR/glance-registry --config-file=$GLANCE_CONF_DIR/glance-registry.conf"
|
||||
screen_it g-api "cd $GLANCE_DIR; $GLANCE_BIN_DIR/glance-api --config-file=$GLANCE_CONF_DIR/glance-api.conf"
|
||||
echo "Waiting for g-api ($GLANCE_HOSTPORT) to start..."
|
||||
if ! timeout $SERVICE_TIMEOUT sh -c "while ! http_proxy= wget -q -O- http://$GLANCE_HOSTPORT; do sleep 1; done"; then
|
||||
if ! timeout $SERVICE_TIMEOUT sh -c "while ! wget --no-proxy -q -O- http://$GLANCE_HOSTPORT; do sleep 1; done"; then
|
||||
die $LINENO "g-api did not start"
|
||||
fi
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ function start_ironic() {
|
||||
function start_ironic_api() {
|
||||
screen_it ir-api "cd $IRONIC_DIR; $IRONIC_BIN_DIR/ironic-api --config-file=$IRONIC_CONF_FILE"
|
||||
echo "Waiting for ir-api ($IRONIC_HOSTPORT) to start..."
|
||||
if ! timeout $SERVICE_TIMEOUT sh -c "while ! http_proxy= wget -q -O- http://$IRONIC_HOSTPORT; do sleep 1; done"; then
|
||||
if ! timeout $SERVICE_TIMEOUT sh -c "while ! wget --no-proxy -q -O- http://$IRONIC_HOSTPORT; do sleep 1; done"; then
|
||||
die $LINENO "ir-api did not start"
|
||||
fi
|
||||
}
|
||||
|
@ -372,7 +372,7 @@ function start_keystone() {
|
||||
fi
|
||||
|
||||
echo "Waiting for keystone to start..."
|
||||
if ! timeout $SERVICE_TIMEOUT sh -c "while ! http_proxy= curl -s http://$SERVICE_HOST:$service_port/v$IDENTITY_API_VERSION/ >/dev/null; do sleep 1; done"; then
|
||||
if ! timeout $SERVICE_TIMEOUT sh -c "while ! curl --noproxy '*' -s http://$SERVICE_HOST:$service_port/v$IDENTITY_API_VERSION/ >/dev/null; do sleep 1; done"; then
|
||||
die $LINENO "keystone did not start"
|
||||
fi
|
||||
|
||||
|
@ -419,7 +419,7 @@ function start_neutron_service_and_check() {
|
||||
# Start the Neutron service
|
||||
screen_it q-svc "cd $NEUTRON_DIR && python $NEUTRON_BIN_DIR/neutron-server $CFG_FILE_OPTIONS"
|
||||
echo "Waiting for Neutron to start..."
|
||||
if ! timeout $SERVICE_TIMEOUT sh -c "while ! http_proxy= wget -q -O- http://$Q_HOST:$Q_PORT; do sleep 1; done"; then
|
||||
if ! timeout $SERVICE_TIMEOUT sh -c "while ! wget --no-proxy -q -O- http://$Q_HOST:$Q_PORT; do sleep 1; done"; then
|
||||
die $LINENO "Neutron did not start"
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user