netplan apply always exits with status 0

Bug #1701434 reported by Witold Krecicki
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netplan
Fix Released
High
Mathieu Trudel-Lapierre
nplan (Ubuntu)
Fix Released
High
Mathieu Trudel-Lapierre

Bug Description

netplan apply returns with status 0 even if it failed:

$ netplan apply && echo "Success!"
Cannot replug eno1: [Errno 13] Permission denied: '/sys/bus/pci/drivers/e1000e/unbind'
Success!

I believe that's an undesider behaviour.

Changed in netplan:
status: New → Triaged
importance: Undecided → High
Changed in nplan (Ubuntu):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Was there any config provided when you did this? Seems like there are also all the service stop/start commands that should get attempted and fail (and these do throw exceptions). I don't think failing to unbind because of a missing file, for example, is critical enough to warrant to completing the apply, but failing to restart NM or systemd would definitely be.

I think this will at the very least need more information about the configuration that was used for netplan.

Changed in nplan (Ubuntu):
status: Triaged → Incomplete
Changed in netplan:
status: Triaged → Incomplete
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
tags: added: id-5966b86bf4d6cb1ad360527b
Revision history for this message
Daniel Axtens (daxtens) wrote :

I'm marking this as confirmed as the behaviour has come up in LP: #1735318.

Changed in netplan:
status: Incomplete → Confirmed
Changed in nplan (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Daniel Axtens (daxtens) wrote :

It looks like at least some of this changed between Bionic and Cosmic - here with a netplan 0.39:

root@netplan:~# netplan apply
Error in network definition /etc/netplan/50-cloud-init.yaml line 5 column 0: unknown key xxnetwork
root@netplan:~# echo $?
78

Revision history for this message
Lee Trager (ltrager) wrote :

I'm seeing the same thing in LP:1835275 except netplan doesn't output any errors.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

No; by now this is working exactly as expected; netplan should return 0 as long as there is no actual syntax error in the netplan config; for now everything else is left to the backends.

Changed in nplan (Ubuntu):
status: Confirmed → Fix Released
Changed in netplan:
status: Confirmed → Fix Released
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.