do not search for mirror named '<distro>-mirror' in dns by default
As described in the bug, enough non-cloud users experienced issues with cloud-init selecting a mirror due to consumer level network providers using dns server redirection. We're turning this off by default.
This commit is contained in:
parent
76152bbcc1
commit
09be4b0bd3
@ -255,7 +255,7 @@ def find_apt_mirror(cloud, cfg):
|
|||||||
if mydom:
|
if mydom:
|
||||||
doms.append(".%s" % mydom)
|
doms.append(".%s" % mydom)
|
||||||
|
|
||||||
if not mirror:
|
if not mirror and cfg.get(cfg, "apt_mirror_search_dns", False):
|
||||||
doms.extend((".localdomain", "",))
|
doms.extend((".localdomain", "",))
|
||||||
|
|
||||||
mirror_list = []
|
mirror_list = []
|
||||||
|
@ -28,11 +28,14 @@ apt_upgrade: true
|
|||||||
# then use the mirror provided by the DataSource found.
|
# then use the mirror provided by the DataSource found.
|
||||||
# In EC2, that means using <region>.ec2.archive.ubuntu.com
|
# In EC2, that means using <region>.ec2.archive.ubuntu.com
|
||||||
#
|
#
|
||||||
# if no mirror is provided by the DataSource, then search
|
# if no mirror is provided by the DataSource, and 'apt_mirror_search_dns' is
|
||||||
# for dns names '<distro>-mirror' in each of
|
# true, then search for dns names '<distro>-mirror' in each of
|
||||||
# - fqdn of this host per cloud metadata
|
# - fqdn of this host per cloud metadata
|
||||||
# - localdomain
|
# - localdomain
|
||||||
# - no domain (which would search domains listed in /etc/resolv.conf)
|
# - no domain (which would search domains listed in /etc/resolv.conf)
|
||||||
|
# If there is a dns entry for <distro>-mirror, then it is assumed that there
|
||||||
|
# is a distro mirror at http://<distro>-mirror.<domain>/<distro>
|
||||||
|
#
|
||||||
# That gives the cloud provider the opportunity to set mirrors of a distro
|
# That gives the cloud provider the opportunity to set mirrors of a distro
|
||||||
# up and expose them only by creating dns entries.
|
# up and expose them only by creating dns entries.
|
||||||
#
|
#
|
||||||
@ -42,6 +45,8 @@ apt_mirror_search:
|
|||||||
- http://local-mirror.mydomain
|
- http://local-mirror.mydomain
|
||||||
- http://archive.ubuntu.com
|
- http://archive.ubuntu.com
|
||||||
|
|
||||||
|
apt_mirror_search_dns: False
|
||||||
|
|
||||||
# apt_proxy (configure Acquire::HTTP::Proxy)
|
# apt_proxy (configure Acquire::HTTP::Proxy)
|
||||||
apt_proxy: http://my.apt.proxy:3128
|
apt_proxy: http://my.apt.proxy:3128
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user