Skip to content

Commit

Permalink
Don't create the members@ array in config_db for PC when reading from…
Browse files Browse the repository at this point in the history
… minigraph

When loading from minigraph, for port channels, don't create the
members@ array in config_db in the PORTCHANNEL table. This is no longer
needed or used.

In addition, when adding a port channel member from the CLI, that member
doesn't get added into the members@ array, resulting in a bit of
inconsistency. This gets rid of that inconsistency.

Fixes sonic-net#11873.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
  • Loading branch information
saiarcot895 committed Feb 3, 2023
1 parent aa04886 commit 13a5b91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sonic-config-engine/minigraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,9 +532,9 @@ def parse_dpg(dpg, hname):
intfs_inpc.append(pcmbr_list[i])
pc_members[(pcintfname, pcmbr_list[i])] = {}
if pcintf.find(str(QName(ns, "Fallback"))) != None:
pcs[pcintfname] = {'members': pcmbr_list, 'fallback': pcintf.find(str(QName(ns, "Fallback"))).text, 'min_links': str(int(math.ceil(len() * 0.75))), 'lacp_key': 'auto'}
pcs[pcintfname] = {'fallback': pcintf.find(str(QName(ns, "Fallback"))).text, 'min_links': str(int(math.ceil(len() * 0.75))), 'lacp_key': 'auto'}
else:
pcs[pcintfname] = {'members': pcmbr_list, 'min_links': str(int(math.ceil(len(pcmbr_list) * 0.75))), 'lacp_key': 'auto' }
pcs[pcintfname] = {'min_links': str(int(math.ceil(len(pcmbr_list) * 0.75))), 'lacp_key': 'auto' }
port_nhipv4_map = {}
port_nhipv6_map = {}
nhg_int = ""
Expand Down

0 comments on commit 13a5b91

Please sign in to comment.