netplan apply always exits with status 0

Bug #1701434 reported by Witold Krecicki on 2017-06-30
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
netplan
High
Mathieu Trudel-Lapierre
nplan (Ubuntu)
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)

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
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
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

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers