Merge ~smoser/ubuntu/+source/initramfs-tools:bug/1714308-initramfs-dns into ~usd-import-team/ubuntu/+source/initramfs-tools:ubuntu/devel
| Status: | Needs review |
|---|---|
| Proposed branch: | ~smoser/ubuntu/+source/initramfs-tools:bug/1714308-initramfs-dns |
| Merge into: | ~usd-import-team/ubuntu/+source/initramfs-tools:ubuntu/devel |
| Diff against target: |
301 lines (+216/-5) 7 files modified
debian/changelog (+7/-0) scripts/functions (+174/-5) tests/test_netinfo.d/ipv4/netplan/eth1.yaml (+5/-0) tests/test_netinfo.d/ipv4and6/netplan/eth0.yaml (+6/-0) tests/test_netinfo.d/ipv4static/netplan/eth1.yaml (+4/-0) tests/test_netinfo.d/ipv6/netplan/eno1.yaml (+5/-0) tests/test_netinfo.sh (+15/-0) |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Ubuntu Server Dev import team | 2017-08-31 | Pending | |
|
Review via email:
|
|||
Description of the Change
networking: write netplan files in /run/netplan, add some tests.
Render /run/netplan/*.conf files for each device configured in the
initramfs.
The netinfo_to_netplan function handles reading 'netinfo' style files
(those written by klibcs 'ipconfig' or the dhclient for the ipv6 path)
and writing /run/netplan/
Note the following use cases that are not covered:
a. user has files in the root /etc/netplan that conflict with the
generated /run/netplan/*.conf files.
b. the networking configured by 'configure_
to be used in the initramfs and not afterward.
Note also that the order of arguments passed to netinfo_to_netplan is
important and will have implications on things such as nameservers/search
keys.
Also, adds some tests for the netplan rendering.
This extends the tests/run-tests that I previously added
and puts a new tests/test_
LP: #1713803
| Scott Moser (smoser) wrote : | # |
| Scott Moser (smoser) wrote : | # |
OK.
Now this branch is writing resolv.conf in the initramfs and also writing /run/netplan/
I've added some tests to verify output.
I've not integration tested, but it seems that there is a fair shot now that
if we have this code boot with 'ip=' on the command line then it will
write /run/netplan/
to the real root.
since the /run/netplan files will have dns info in them i think that netplan might
do the right thing. The thing i'm not sure about is if netplan will bounce the
interfaces or not.
- 1d11695... by Scott Moser on 2017-09-05
- aabc1e0... by Scott Moser on 2017-09-05
- 6b8d55b... by Scott Moser on 2017-09-05
- 9f473ce... by Scott Moser on 2017-09-19
- 3063dc1... by Scott Moser on 2017-09-19
- 0b98524... by Scott Moser on 2017-09-29
| Scott Moser (smoser) wrote : | # |
In a discussion with Dimitri, it was suggested that one way to transition
the link to systemd-networkd more fully would be to write files like:
/run/
and
/run/
Then it is believed that systemd-networkd would even manage the dhcp link
correctly.
One question this brings up in my mind, is what should/will happen when a
dhcp lease is up on an interface when a network filesystem or block
device resides on that link? This isn't specific at all to initramfs
transition as it would apply to any dhcp-configured network device that
mounts network filesystem.
As an example, of content, in an lxc container I have:
# cat /run/systemd/
# This is private data. Do not parse.
ADDRESS=
NETMASK=
ROUTER=10.75.205.1
SERVER_
NEXT_SERVER=
BROADCAST=
T1=1800
T2=3150
LIFETIME=3600
DNS=10.75.205.1
DOMAINNAME=lxd
HOSTNAME=a1
CLIENTID=
# cat /run/systemd/
# This is private data. Do not parse.
ADMIN_STATE=
OPER_STATE=routable
NETWORK_
DNS=10.75.205.1 fd42:eee5:
NTP=
DOMAINS=lxd
ROUTE_DOMAINS=
LLMNR=yes
MDNS=no
ADDRESSES=
ROUTES=
DHCP4_ADDRESS=
DHCP_LEASE=
Unmerged commits
- 6b8d55b... by Scott Moser on 2017-09-05
- aabc1e0... by Scott Moser on 2017-09-05
- 0b98524... by Scott Moser on 2017-09-29
- 1d11695... by Scott Moser on 2017-09-05
- 3063dc1... by Scott Moser on 2017-09-19
- 9f473ce... by Scott Moser on 2017-09-19
- 48b52ea... by Andy Whitcroft on 2017-08-30
- c210559... by LaMont Jones on 2016-12-15
- e0f307c... by LaMont Jones on 2016-12-15
- 59cf727... by LaMont Jones on 2016-12-15


I thought some after I put this up.
I think it might make sense for the netplan path to have the initramfs write netplan configuration to /run/netplan/ (I think it reads there).