mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
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)
15 lines
232 B
Python
15 lines
232 B
Python
#!/usr/bin/env python
|
|
#
|
|
# Copyright 2015 Cumulus Networks, Inc. All rights reserved.
|
|
#
|
|
# Author: Roopa Prabhu, roopa@cumulusnetworks.com
|
|
#
|
|
#
|
|
|
|
class ifupdownConfig():
|
|
|
|
def __init__(self):
|
|
self.conf = {}
|
|
|
|
config = ifupdownConfig()
|