projectbuendia / buendia

Main project repository (see the Wiki for details)
Apache License 2.0
117 stars 36 forks source link

Improvements to networking logic #228

Closed schuyler closed 5 years ago

schuyler commented 5 years ago

This PR provides a number of improvements to the existing buendia-networking config.d logic.

  1. Use of allow-hotplug on the Ethernet interface defers DHCP client requests until an Ethernet cable is plugged into the adapter. This prevents a ~1m delay to system startup when no Ethernet cable is connected.
  2. Rather than explicitly enabling or disabling the DHCP client daemon in the config.d script, we just let ifup deal with running dhcpcd or not.
  3. Add a NETWORKING_IP_FALLBACK setting that provides a fallback IP address for the Ethernet adapter in the event that a cable is plugged in but no DHCP server is found. This ensures that an admin can connect a laptop and SSH to port 9022 on a known static IP address, no matter what.
  4. This PR reverts the adoption of separate files in /etc/network/interfaces.d/* provides in PR #218. The justification is that, if a device is removed e.g. by setting NETWORKING_ETHERNET_INTERFACE to "", the interfaces.d approach would leave Buendia with no way of knowing which interfaces were removed. Having a single interfaces file means we simply overwrite any configuration changes and have done.

This PR fixes #219 and #221.

zestyping commented 5 years ago

This seems like exactly what we want. Great!