"netplan apply" does not apply changes to netmask when CIDR notation modified on static IP

Bug #1793189 reported by Suzanne Palmer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
netplan.io (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

So, somebody who hadn't had enough coffee one morning typoed the CIDR notation in /etc/netplan/01-netcfg.yaml on their server, resulting in the wrong netmask for the static IP. I corrected the CIDR notation, but "netplan apply" would not pick up the new info and update the netmask. Tested across four servers running 18.04 and same behavior occurred; required a reboot to get them to pick up the changed netmask info.

Thanks!
-Suzanne

Revision history for this message
Suzanne Palmer (cicada) wrote :
Revision history for this message
Lukas Märdian (slyon) wrote :

I cannot reproduce this with Netplan 0.99 on Bionic. Please re-open if this is still an issue for you.

root@bb:~# cat /etc/netplan/50-cloud-init.yaml
network:
    version: 2
    ethernets:
        eth0:
            dhcp4: true
            addresses: [10.10.10.23/23]
root@bb:~# netplan apply
root@bb:~# ip a show dev eth0
88: eth0@if89: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:16:3e:bd:da:7d brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 10.10.10.23/23 brd 10.10.11.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet 10.238.94.182/24 brd 10.238.94.255 scope global dynamic eth0
       valid_lft 3591sec preferred_lft 3591sec
    inet6 fd42:7213:f20e:bd74:216:3eff:febd:da7d/64 scope global mngtmpaddr noprefixroute
       valid_lft forever preferred_lft forever
    inet6 fe80::216:3eff:febd:da7d/64 scope link
       valid_lft forever preferred_lft forever

root@bb:~# vim /etc/netplan/50-cloud-init.yaml
root@bb:~# cat /etc/netplan/50-cloud-init.yaml
network:
    version: 2
    ethernets:
        eth0:
            dhcp4: true
            addresses: [10.10.10.23/24]
root@bb:~# netplan apply
root@bb:~# ip a show dev eth0
88: eth0@if89: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:16:3e:bd:da:7d brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 10.10.10.23/24 brd 10.10.10.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet 10.238.94.182/24 brd 10.238.94.255 scope global dynamic eth0
       valid_lft 3595sec preferred_lft 3595sec
    inet6 fd42:7213:f20e:bd74:216:3eff:febd:da7d/64 scope global mngtmpaddr noprefixroute
       valid_lft forever preferred_lft forever
    inet6 fe80::216:3eff:febd:da7d/64 scope link
       valid_lft forever preferred_lft forever

Changed in netplan.io (Ubuntu):
status: New → Invalid
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.