Don't fail if attempting to add more resolvers (RHEL 7/CentOS 7)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Expired
|
Medium
|
Unassigned |
Bug Description
I have multiple network interfaces in OpenStack. Each defines 2 resolvers. This goes over 3 resolvers and on RHEL that leads to the following traceback:
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: [CLOUDINIT] util.py[DEBUG]: Read 140 bytes from /etc/resolv.conf
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: [CLOUDINIT] util.py[WARNING]: failed stage init-local
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: 2016-09-06 13:26:03,786 - util.py[WARNING]: failed stage init-local
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: [CLOUDINIT] util.py[DEBUG]: failed stage init-local
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: failed run of stage init-local
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: -------
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: Traceback (most recent call last):
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: File "/usr/lib/
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: ret = functor(name, args)
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: File "/usr/lib/
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: init.apply_
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: File "/usr/lib/
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: return self.distro.
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: File "/usr/lib/
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: dev_names = self._write_
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: File "/usr/lib/
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: self._net_
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: File "/usr/lib/
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: existing_
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: File "/usr/lib/
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: content.
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: File "/usr/lib/
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: "'3' maximum name servers") % (ns))
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: ValueError: Adding u'172.17.48.4' would go beyond the '3' maximum name servers
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: -------
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: [CLOUDINIT] util.py[DEBUG]: Reading from /proc/uptime (quiet=False)
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: [CLOUDINIT] util.py[DEBUG]: Read 10 bytes from /proc/uptime
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: [CLOUDINIT] util.py[DEBUG]: cloud-init mode 'init' took 0.509 seconds (0.51)
Sep 06 13:26:03 testing02.novalocal cloud-init[362]: [CLOUDINIT] handlers.py[DEBUG]: finish: init-local: SUCCESS: searching for local datasources
Sep 06 13:26:03 testing02.novalocal systemd[1]: cloud-init-
Sep 06 13:26:03 testing02.novalocal systemd[1]: Failed to start Initial cloud-init job (pre-networking).
Sep 06 13:26:03 testing02.novalocal systemd[1]: Unit cloud-init-
Sep 06 13:26:03 testing02.novalocal systemd[1]: cloud-init-
On Ubuntu the name servers are added to /etc/network/
I believe that instead of raising a ValueError it should instead just accept the first three it receives. There is currently not a change I can make in my cloud to limit the amount of resolvers sent down because not all VM's are on both networks, and having a minimal of two DNS servers is still best practice.
Related branches
- Bert JW Regeer (community): Disapprove
- cloud-init Commiters: Pending requested
-
Diff: 64 lines (+24/-3)1 file modifiedcloudinit/net/sysconfig.py (+24/-3)
summary: |
- Don't fail if attempting to add more resolvers + Don't fail if attempting to add more resolvers (RHEL 7/CentOS 7) |
Changed in cloud-init: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Launchpad somehow can't find the branch I just pushed... but here it is:
https:/ /code.launchpad .net/~bregeer- ctl/cloud- init/+git/ cloud-init/ +ref/bugfix/ centos7_ resolv