Merge ~smoser/ubuntu/+source/resolvconf:bug/1675571-add-rc-prog into ~usd-import-team/ubuntu/+source/resolvconf:ubuntu/devel
| Status: | Needs review |
|---|---|
| Proposed branch: | ~smoser/ubuntu/+source/resolvconf:bug/1675571-add-rc-prog |
| Merge into: | ~usd-import-team/ubuntu/+source/resolvconf:ubuntu/devel |
| Diff against target: |
126 lines (+44/-12) 6 files modified
debian/changelog (+10/-0) debian/resolvconf.000resolvconf.if-up (+10/-5) debian/resolvconf.000resolvconf.ppp.ip-down (+1/-1) debian/resolvconf.000resolvconf.ppp.ip-up (+1/-1) debian/resolvconf.resolvconf.if-down (+10/-5) man/resolvconf.8 (+12/-0) |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Scott Moser | Approve on 2017-03-30 | ||
|
Review via email:
|
|||
Commit Message
allow setting of program name via dns-iface-name option in interfaces(5).
When ifupdown has multiple addresses for a given interface, integration
with resolvconf is broken. This is because resolvconf is called for each
stanza, but the scripts in /etc/network/
resolvconf -a IFACE.PROG
or
resolvconf -d IFACE.PROG
with IFACE being the interface name, and PROG set to ADDRFAM, where
ADDRFAM is only 'inet' or 'inet6'.
The solution here is to allow the author of interfaces(5) to provide
the program name via option 'dns-iface-name'.
As an example:
auto eth0
iface eth0 inet static
address 138.197.98.102/20
gateway 138.197.96.1
dns-nameservers 8.8.8.8
dns-iface-name public0
iface eth0 inet static
address 10.17.0.11/16
dns-iface-name local
LP: #1675571
| Scott Moser (smoser) wrote : | # |
| Scott Moser (smoser) wrote : | # |
I addressed 'a' and 'b' above, but then realized that the dhclient script does not have access to the IF_* variables. so this does not work if any dhcp are used.
| Scott Moser (smoser) wrote : | # |
> I addressed 'a' and 'b' above, but then realized that the dhclient script does
> not have access to the IF_* variables. so this does not work if any dhcp are
> used.
Well, i was sort of right.
dhclient ends up using a resolvconf like the following
ipv4: /sbin/resolvconf -a "${interface}
ipv6: /sbin/resolvconf -a "${interface}
So it turns out that this will work. 'dhcp' or dhcpv6' stanzas will not overwrite any *non* dhcp stanzas, but you can't have 2 ipv4 or 2 ipv6 dhcp stanzas or *they* would fight.
| Scott Moser (smoser) wrote : | # |
The other option for this is to not require the ENI author to put these variables in, but instead have ifupdown provide a consistent value that resolvconf could use. But that would have to be made consistent across changes to the file, deletes of interfaces or adds of interfaces in any order.
Ie, this has to work for any ordering of eth1 and eth0 or their multiple stanzas inside an ENI.
ifup eth1
ifup eth0
ifdown eth0
# edit ENI, remove eth1
ifup down eth0
Unmerged commits
- 257b73e... by Scott Moser on 2017-03-28
- 5a54f58... by Scott Moser on 2017-03-28


Since it is resolvconf that adds the dns-* entries to interfaces,
a.) this should be adjusted to just use that namespace (change resolvconf-prog to dns-program-name)
b.) need to document this in man/resolvconf.8