No network devices configured if YAML error in any file

Bug #1746842 reported by Daniel Axtens
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nplan (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

- Start a VM with a network interface created by cloud-init (say ens3), and assume you have no physical console (e.g. cloud VM)
- Add another network interface (say ens7)
- Create another YAML file to configure ens7, but make a small error. This file need not reference ens3 at all!
- Reboot machine

- Observe the following message on boot
systemd[332]: /lib/systemd/systemd-generators/netplan failed with error code 1.

- Observe that you can no longer SSH in to the machine because the error in the new yaml file prevents all generation, so ens3 is not configured.

This is observed with the latest code on git. It renders the system entirely unusable unless there is an alternative way to get in.

 1) An error in the configuration of device X should not stop device Y from being configured!
 2) Users should be instructed to always run netplan-generate to test for bugs. (Maybe a wrapper like visudo or crontab -e would be good?)

tags: added: id-5f49091e948ca976fd80dc81
Revision history for this message
Simon Chopin (schopin) wrote :

Hello,

After a discussion with the current Netplan team, we've reached the conclusion that we prefer the current behaviour of failing completely rather than applying a partial configuration. Our decision is based on several factors:

* The predictability of the system is greater: either it produces a full backend configuration, or none at all
* Partial application might actually break systems when applied directly via netplan apply. For instance, if the operator's SSH connection is routed through a bridge, and said bridge configuration is faulty, netplan apply will break the system, whereas an overall failure would leave the current configuration untouched.
* Operators are expected to test their configurations using netplan try and netplan apply, which should at least catch syntax issues before the reboot scenario.

Consequently, I'm marking this bug as WONTFIX.

Graham Inggs (ginggs)
Changed in nplan (Ubuntu):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.