This is within an OpenStack environment using Ubuntu 16.04 OS.
This ticket relates to two issues that prevent interface from coming up after reboot.
It seems Webmin will add one or more DNS servers entries in the file /etc/network/interfaces when using the Networking->Host names and DNS client module and during the Setup Wizard after a fresh installation.
The entries below cause 'misplaced option' error when the command
sudo ifup ens3 is issued:
/etc/network/interfaces:8: misplaced option
ifup: couldn't read interfaces file "/etc/network/interfaces"
When these entries are added to /etc/network/interfaces when system is already running it will not cause any apparent issue. The error only occurs once the system tries to bring up to interface, which in most cases will be when the server is rebooted.
STR: Add the following line below to /etc/network/interfaces manually.
Alternatively, use the Webmin GUI to have these entries generated. A) set the DNS servers using Webmin Network Configuration module. B) set the Firewall to Start at boot using the Linux Firewall
dns-nameservers 22.214.171.124 127.0.0.1
post-up iptables-restore < /etc/iptables.up.rules
Upon reboot these entries will prevent the network interface (in this case ens3) to come up. The only way to recover is to login via the console on comment out the lines as per screenshot.
Once the lines are commented out the interface can be brought up again using
sudo ifup ens3
Note: Within an OpenStack instance one does not have to set the network interfaces to static. The configuration of the instances supplied by the hosting provider are sufficient.