Fix confirmed in LXD container:

============================================================================
BEFORE
============================================================================

root@demo:~# ip -c a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group 
default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
15: eth0@if16: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state 
UP group default qlen 1000
    link/ether 00:16:3e:01:ac:f3 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 10.64.229.148/24 brd 10.64.229.255 scope global dynamic eth0
       valid_lft 3575sec preferred_lft 3575sec
    inet6 fd42:7a56:79d:e8cb:216:3eff:fe01:acf3/64 scope global dynamic 
mngtmpaddr noprefixroute 
       valid_lft 3593sec preferred_lft 3593sec
    inet6 fe80::216:3eff:fe01:acf3/64 scope link 
       valid_lft forever preferred_lft forever
root@demo:~# netplan apply
root@demo:~# ip addr add 192.168.0.1/24 dev eth0 label eth0:0
root@demo:~# netplan apply
Traceback (most recent call last):
  File "/usr/sbin/netplan", line 23, in <module>
    netplan.main()
  File "/usr/share/netplan/netplan/cli/core.py", line 50, in main
    self.run_command()
  File "/usr/share/netplan/netplan/cli/utils.py", line 130, in run_command
    self.func()
  File "/usr/share/netplan/netplan/cli/commands/apply.py", line 43, in run
    self.run_command()
  File "/usr/share/netplan/netplan/cli/utils.py", line 130, in run_command
    self.func()
  File "/usr/share/netplan/netplan/cli/commands/apply.py", line 106, in 
command_apply
    stderr=subprocess.DEVNULL)
  File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['udevadm', 'test-builtin', 
'net_setup_link', '/sys/class/net/eth0:0']' returned non-zero exit status 4.

============================================================================
FIX
============================================================================

root@demo:~# apt install netplan.io
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  network-manager | wpasupplicant
The following packages will be upgraded:
  netplan.io
1 upgraded, 0 newly installed, 0 to remove and 21 not upgraded.
Need to get 64.8 kB of archives.
After this operation, 22.5 kB of additional disk space will be used.
Get:1 http://security.ubuntu.com/ubuntu bionic-proposed/main amd64 netplan.io 
amd64 0.98-0ubuntu1~18.04.1 [64.8 kB]
Fetched 64.8 kB in 0s (247 kB/s)   
(Reading database ... 13924 files and directories currently installed.)
Preparing to unpack .../netplan.io_0.98-0ubuntu1~18.04.1_amd64.deb ...
Unpacking netplan.io (0.98-0ubuntu1~18.04.1) over (0.97-0ubuntu1~18.04.1) ...
Setting up netplan.io (0.98-0ubuntu1~18.04.1) ...
Processing triggers for dbus (1.12.2-1ubuntu1.1) ...

============================================================================
AFTER
============================================================================

root@demo:~# ip -c a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group 
default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
17: eth0@if18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state 
UP group default qlen 1000
    link/ether 00:16:3e:01:ac:f3 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 10.64.229.148/24 brd 10.64.229.255 scope global dynamic eth0
       valid_lft 3568sec preferred_lft 3568sec
    inet6 fd42:7a56:79d:e8cb:216:3eff:fe01:acf3/64 scope global dynamic 
mngtmpaddr noprefixroute 
       valid_lft 3593sec preferred_lft 3593sec
    inet6 fe80::216:3eff:fe01:acf3/64 scope link 
       valid_lft forever preferred_lft forever
root@demo:~# netplan apply
root@demo:~# ip addr add 192.168.0.1/24 dev eth0 label eth0:0
root@demo:~# netplan apply
root@demo:~#

** Tags removed: verification-needed verification-needed-bionic
** Tags added: verification-done-bionic

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1810043

Title:
  netplan apply fails if NIC alias exists

To manage notifications about this bug go to:
https://bugs.launchpad.net/netplan/+bug/1810043/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to