Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no dns check when http_proxy is configured #6002

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions parts/linux/cloud-init/artifacts/cse_main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,16 @@ if [[ "${SHOULD_CONFIGURE_CUSTOM_CA_TRUST}" == "true" ]]; then
logs_to_events "AKS.CSE.configureCustomCaCertificate" configureCustomCaCertificate || exit $ERR_UPDATE_CA_CERTS
fi

registry_domain_name="${MCR_REPOSITORY_BASE:-mcr.microsoft.com}"
registry_domain_name="${registry_domain_name%/}"
# Avoid DNS check when http proxy is configured since the DNS resolution will be done through the proxy
if [[ "${SHOULD_CONFIGURE_HTTP_PROXY}" != "true" ]]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the two if blocks checking ${BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER} and ${SHOULD_CONFIGURE_HTTP_PROXY} on surface are not complete to cover all situations. not sure whether this block should move up to join line 63..

should registry_domain_name always have a value?

registry_domain_name="${MCR_REPOSITORY_BASE:-mcr.microsoft.com}"
registry_domain_name="${registry_domain_name%/}"

if [[ -n ${BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER} ]]; then
registry_domain_name="${BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER%%/*}"
if [[ -n ${BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER} ]]; then
registry_domain_name="${BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER%%/*}"
fi
verify_DNS_health $registry_domain_name || exit $ERR_DNS_HEALTH_FAIL
fi
verify_DNS_health $registry_domain_name || exit $ERR_DNS_HEALTH_FAIL

if [[ -n "${OUTBOUND_COMMAND}" ]]; then
if [[ -n "${PROXY_VARS}" ]]; then
Expand Down
Loading