#883754 ifupdown: after changing static ip: old ip still exists

Package:
ifupdown
Source:
ifupdown
Description:
high level tools to configure network interfaces
Submitter:
Honza Maly
Date:
2017-12-07 08:24:05 UTC
Severity:
normal
#883754#5
Date:
2017-12-07 08:21:40 UTC
From:
To:
Dear Maintainer,

this bug was already reported on Ubuntu but I would like to mention I found it on
Debian as well.
(See https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1584682 )

Specifically, it appeared on virtual servers, which use ifupdown to change
ip address when generating new server from saved image. Instead of new address
replacing the other, it was added and the old address remained on the interface.

The /etc/network/interfaces was changed correctly, however see ip addr list output:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    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
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether bc:76:4e:10:38:f5 brd ff:ff:ff:ff:ff:ff
    inet 198.61.174.85/24 brd 198.61.174.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet 104.130.217.167/24 brd 104.130.217.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 2001:4801:7828:101:be76:4eff:fe10:38f5/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::be76:4eff:fe10:38f5/64 scope link
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether bc:76:4e:10:3a:55 brd ff:ff:ff:ff:ff:ff
    inet 10.209.101.65/19 brd 10.209.127.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet 10.210.195.129/19 brd 10.210.223.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::be76:4eff:fe10:3a55/64 scope link
       valid_lft forever preferred_lft forever

The addresses 198.61.174.85/24 and 10.209.101.65/19 are old ones which should've been replaced.

    Honza
--- up and down scripts installed:
/etc/network/if-down.d:
total 8
-rwxr-xr-x 1 root root 256 Jan 27  2015 resolvconf
-rwxr-xr-x 1 root root 332 Mar 14  2013 upstart

/etc/network/if-post-down.d:
total 0

/etc/network/if-pre-up.d:
total 0

/etc/network/if-up.d:
total 20
-rwxr-xr-x 1 root root  817 Jan 27  2015 000resolvconf
-rwxr-xr-x 1 root root 4958 Apr  6  2015 mountnfs
-rwxr-xr-x 1 root root  972 Jun 18 00:08 openssh-server
-rwxr-xr-x 1 root root 1483 Mar 14  2013 upstart