]> git.proxmox.com Git - mirror_ifupdown2.git/commit - etc/network/ifupdown2/ifupdown2.conf
ifupdown2: address: squash addr config and process them on the youngest sibling
authorRoopa Prabhu <roopa@cumulusnetworks.com>
Tue, 17 Nov 2015 05:00:40 +0000 (21:00 -0800)
committerSam Tannous <stannous@cumulusnetworks.com>
Wed, 9 Dec 2015 18:53:20 +0000 (13:53 -0500)
commit0582f185edf0c61eb4d216904f848755165f608b
treef4d88cea701b3be81f9580ecfa476c27d49cc480
parent0c8332bc5ec1934f7eaa67c11a916b35b6b6c8fc
ifupdown2: address: squash addr config and process them on the youngest sibling

Ticket: CM-7917
Reviewed By: CCR-3845
Testing Done: Tested changing address and ifreloading on multiple iface stanzas

In presence of multiple iface stanzas, current ifupdown2 does not purge
existing addresses.
Because each ifaceobject processing looks at only its stanzas and it is
afraid that it may purge running addresses that does not belong to
itself. Historically multiple iface stanzas are processed individually
than squashing them as a single interface. Squashing iface stanzas into
a single iface stanza has been a problem in the past and also does not
work well with iface stanzas that are supported by ifupdown (I dont have
a specific problem example right now...but)

This patch processes all address attributes when processing the first iface
object (or iface stanza). Unsure if this can be a surprise to existing
users. It should not but cant say sometimes people have weird things in
their pre-up/post-up commands. Hence this is controlled by a ifupdown2.conf
variable addr_config_squash=0 set to off by default. still debating if this
can be on by default.

When addr_config_squash=0 and existing addresses are not purged a
warning is displayed:
"warning: swp1: interface has multiple iface stanzas skip purging
existing addresses"

(cherry picked from commit 7aaa75674547392f2abb8273b18671f0795b3eaf)
addons/address.py
config/ifupdown2.conf
ifupdown/iface.py
ifupdown/ifupdownmain.py
packages/ifupdown2/ifupdown/ifupdownconfig.py [new file with mode: 0644]