Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lldp]: Get all interfaces from the database #1069

Merged
merged 1 commit into from
Oct 24, 2017
Merged

[lldp]: Get all interfaces from the database #1069

merged 1 commit into from
Oct 24, 2017

Conversation

stcheng
Copy link
Contributor

@stcheng stcheng commented Oct 23, 2017

The previous implementation only supports EthernetX while X
varies from 0 - 124. Remove such hard coded logics and use
the information from the database instead.

Signed-off-by: Shu0T1an ChenG shuche@microsoft.com

...
INFO supervisord: lldpd-conf-reload interface Ethernet63 is created
INFO supervisord: lldpd-conf-reload interface Ethernet46 is created
INFO supervisord: lldpd-conf-reload interface Ethernet21 is created
INFO supervisord: lldpd-conf-reload interface Ethernet20 is created
INFO supervisord: lldpd-conf-reload interface Ethernet23 is created
INFO supervisord: lldpd-conf-reload interface Ethernet35 is created
INFO supervisord: lldpd-conf-reload interface Ethernet25 is created
INFO supervisord: lldpd-conf-reload interface Ethernet24 is created
INFO supervisord: lldpd-conf-reload interface Ethernet27 is created
INFO supervisord: lldpd-conf-reload interface Ethernet26 is created
INFO supervisord: lldpd-conf-reload Wait 10 seconds while lldpd finds new interfaces
INFO lldp.sh[31070]: 2017-10-23 18:31:00,859 INFO success: lldpd-conf-reload entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
INFO supervisord 2017-10-23 18:30:59,455 INFO spawned: 'lldpd-conf-reload' with pid 22370
INFO supervisord 2017-10-23 18:31:00,859 INFO success: lldpd-conf-reload entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
INFO supervisord: lldpd-conf-reload Apply lldpd configuration
INFO supervisord: lldpd-conf-reload
INFO supervisord: lldpd-conf-reload Wait until all ifaces are destroyed

@lguohan
Copy link
Collaborator

lguohan commented Oct 23, 2017

@pavel-shirshov to review.

@stcheng
Copy link
Contributor Author

stcheng commented Oct 23, 2017

With this patch, the test LLDP will pass.

Copy link
Contributor

@pavel-shirshov pavel-shirshov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

if_step=4
last_if_idx=$((num_of_interfaces*if_step - if_step))
# TODO: Listen to state database when it is ready
interfaces=`sonic-cfggen -d -v "PORT.keys() | join(' ')"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest to use $() instead of deprecated back ticks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks i'll update this pull request

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

The previous implementation only supports EthernetX while X
varies from 0 - 124. Remove such hard coded logics and use
the information from the database instead.

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
@stcheng
Copy link
Contributor Author

stcheng commented Oct 23, 2017

will merge once the build passes

@lguohan lguohan merged commit fd34d90 into sonic-net:master Oct 24, 2017
@stcheng stcheng deleted the lldp branch October 24, 2017 06:59
yxieca added a commit to yxieca/sonic-buildimage that referenced this pull request Oct 2, 2019
Submodule src/sonic-swss fcd091c..9585be4:
  > [teamsyncd]: Check if LAG exists before removing (sonic-net#1069)
  > [mirrororch]: Toggle the mirror session when moving between VLAN/non-VLAN (sonic-net#1078)

Submodule src/sonic-utilities 7bb6ffb..2d721de:
  > [show] Properly replace port name with alias in command output (sonic-net#664)
  > [neighbor_advertiser] hand pick partial change from sonic-net#525 (sonic-net#689)
  > Revert "Revert "Fixed config Asym PFC CLI. (sonic-net#632)" (sonic-net#652)"

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
yxieca added a commit that referenced this pull request Oct 3, 2019
* [201811][swss][utilities] advance sub module head

Submodule src/sonic-swss fcd091c..9585be4:
  > [teamsyncd]: Check if LAG exists before removing (#1069)
  > [mirrororch]: Toggle the mirror session when moving between VLAN/non-VLAN (#1078)

Submodule src/sonic-utilities 7bb6ffb..2d721de:
  > [show] Properly replace port name with alias in command output (#664)
  > [neighbor_advertiser] hand pick partial change from #525 (#689)
  > Revert "Revert "Fixed config Asym PFC CLI. (#632)" (#652)"

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* address compile issue

Submodule src/sonic-swss 9585be4..2529d79:
  > [mirrororch]: Address compiler switch issue (#1079)

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
lguohan pushed a commit that referenced this pull request Oct 20, 2019
Sonic-swss-common:

aaa8133 - 2019-10-12 : Add VRF object table in state_db (#312) [Tyler Li]
91aceb1 - 2019-10-11 : [schema] Update schema to support debug counters (#308) [Danny Allen]
9bcd5ca - 2019-09-28 : [multi-DB] fix vs test, should NOT replace old DBConnector API with new DBConnector API since vs test docker has no database_config.josn (#311) [Dong Zhang]
599155a - 2019-09-25 : [multi-DB] Part 2: C++ interface API changes / swsscommon unit test / LOGLEVEL_DB apply new API (#301) [Dong Zhang]
379ac73 - 2019-09-20 : add bulkremove for consumer_table_pops.lua (#306) [Dong Zhang]
6b805d3 - 2019-09-19 : timerfd return 0 with errno =0 - handle as False alarm. (#302) [Renuka Manavalan]
e455891 - 2019-09-03 : Add VLAN_SUB_INTERFACE in CONFIG_DB schema (#284) [Wenda Ni]

Sonic-swss

731a8f5 - 2019-10-17 : [copporch]: fix the endless loop problem when removing copp table group. (#1038) [wangshengjun]
1623219 - 2019-10-14 : Enable C++ unit test during build (#1092) [Qi Luo]
629c9d3 - 2019-10-14 : [vstest]: Revert back to 2 sec, and check if we got more than expected number of syslogs (#1091) [Prince Sunny]
80b2ace - 2019-10-11 : sonic-swss/orchagent: Add new protocol trap name support (#1087) [jpxjlrldgit]
9f765f7 - 2019-10-11 : [aclorch]: Check for existing mirror table only when creating a new table (#1089) [Danny Allen]
4c10260 - 2019-10-11 : [vstest]: Update Route test to check for added entry (#1088) [Prince Sunny]
e658b64 - 2019-10-11 : [chassisorch]: Add everflow feature for chassis (#1024) [Ze Gan]
5b13387 - 2019-10-10 : [changelog]: Revert changelog that was done for passing VS test. (#1080) [Prince Sunny]
90a690d - 2019-10-10 : [aclorch]: Simplify the TCP flags matching code and support exact value match (#1072) [Shuotian Cheng]
3461710 - 2019-10-09 : Single VRF for ingress and egress flows, skip route replication (#1045) [Prince Sunny]
953474a - 2019-10-03 : [swss]: Do not use namespace in header files (#1081) [Wenda Ni]
bd36751 - 2019-10-03 : Change nexthop key to ip & ifname (#977) [tylerlinp]
fee1aaa - 2019-10-02 : [teamsyncd]: Check if LAG exists before removing (#1069) [Shuotian Cheng]
175f3de - 2019-09-30 : Update ECMP NHopGroup for Port Channel oper down (#1030) [Sumukha Tumkur Vani]
182940d - 2019-09-26 : [mirrororch]: Remove mirror session state after it is remvoed (#1066) [Shuotian Cheng]
d823dd1 - 2019-09-20 : [MirrorOrch]: Mirror Session Retention across Warm Reboot (#1054) [Shuotian Cheng]
a5b6e7c - 2019-09-19 : Ignore link local neighbors (#1065) [Prince Sunny]
0ddaba3 - 2019-09-19 : Adopt to signature change of Selectable::readData, which switched (#1061) [Renuka Manavalan]
543bd98 - 2019-09-18 : [aclorch]: Fix table name in counter table for mirror rules (#1060) [Shuotian Cheng]
12c29b4 - 2019-09-19 : Cannot ping to link-local ipv6 interface address of the switch. (#774) [Kiran Kumar Kella]
4d8e08d - 2019-09-18 : change in fpmsyncd to skip the lookup for the Master device name if the route object table value is zero (#1048) [Arvindsrinivasan Lakshmi narasimhan]
da514f5 - 2019-09-18 : Do not update lag mtu from teamsyncd (netlink) (#1053) [Prince Sunny]
3fb22e1 - 2019-09-16 : Check warmboot flag during initialization (#1057) [Prince Sunny]
d98d1e9 - 2019-09-16 : [aclorch]: Egress mirror action support and action ASIC support check (#963) [Stepan Blyshchak]
313ef5c - 2019-09-09 : Warmboot Vlan neigh restore fix (#1040) [Prince Sunny]
5841e06 - 2019-09-06 : Add dot1p to tc mapping support (#871) [Wenda Ni]
39fe568 - 2019-08-30 : [aclorch]: Revise ACL rule creation/removal logs (#1042) [Shuotian Cheng]
c461911 - 2019-08-27 : [copporch]: Fix the typo - mld_v1_done (#1037) [wangshengjun]
34915de - 2019-08-22 : [portsyncd]: Add default catch block in portsyncd (#1033) [SuvarnaMeenakshi]
dc81a21 - 2019-08-20 : [vnet]: Fix FDB related failure in "vnet_bitmap" virtual switch test (#1034) [Volodymyr Samotiy]
5ae4226 - 2019-08-19 : [test]: Adjust stale timer for warm-reboot neighborsync test cases (#1031) [zhenggen-xu]
65cbd55 - 2019-08-16 : [build]: Fix compiling warnings using ARM 32 bit compiler (#1015) [arheneus@marvell.com]
b611808 - 2019-08-16 : [Orchagent]: Fixbug segmentfault at routeorch (#1025) [Ze Gan]
madhanmellanox pushed a commit to madhanmellanox/sonic-buildimage that referenced this pull request Mar 23, 2020
Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
vdahiya12 added a commit to vdahiya12/sonic-buildimage that referenced this pull request Aug 26, 2020
[config] Update SONiC Environment Vars Whne Loading Minigraph (sonic-net#1073)
Multi asic platform changes for interface, portchannel commands (sonic-net#878)
Update Command-Reference.md (sonic-net#1075)
[filter-fdb] Fix Filter FDB With IPv6 Present in Config DB (sonic-net#1059)
[config] Remove _get_breakout_cfg_file_name helper function (sonic-net#1069)
[SHOW][BGP] support show ip(v6) bgp summary for multi asic platform (sonic-net#1064)
[fanshow] Display other fan status, such as Updating (sonic-net#1014)
Add ip_prefix len based on proxy_arp status (sonic-net#1046)
Enable the platform specific ssd firmware upgrade during reboot (sonic-net#954)
[show][cli[show interface portchannel support for Multi ASIC (sonic-net#1005)
support show interface commands for multi ASIC platforms (sonic-net#1006)

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
vdahiya12 added a commit to vdahiya12/sonic-buildimage that referenced this pull request Aug 26, 2020
[show]bgp]Display the Total number of neighbors in the show ip bgp(v6) summary.  (sonic-net#1079)
[config] Update SONiC Environment Vars When Loading Minigraph (sonic-net#1073)
Multi asic platform changes for interface, portchannel commands (sonic-net#878)
Update Command-Reference.md (sonic-net#1075)
[filter-fdb] Fix Filter FDB With IPv6 Present in Config DB (sonic-net#1059)
[config] Remove _get_breakout_cfg_file_name helper function (sonic-net#1069)
[SHOW][BGP] support show ip(v6) bgp summary for multi asic platform (sonic-net#1064)
[fanshow] Display other fan status, such as Updating (sonic-net#1014)
Add ip_prefix len based on proxy_arp status (sonic-net#1046)
Enable the platform specific ssd firmware upgrade during reboot (sonic-net#954)
[show][cli[show interface portchannel support for Multi ASIC (sonic-net#1005)
support show interface commands for multi ASIC platforms (sonic-net#1006)

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
vdahiya12 added a commit to vdahiya12/sonic-buildimage that referenced this pull request Aug 27, 2020
Fix pfcwd stats crash with invalid queue name (sonic-net#1077)
[show][bgp]Display the Total number of neighbors in the show ip bgp(v6) summary. (sonic-net#1079)
[config] Update SONiC Environment Vars When Loading Minigraph (sonic-net#1073)
Multi asic platform changes for interface, portchannel commands (sonic-net#878)
Update Command-Reference.md (sonic-net#1075)
[filter-fdb] Fix Filter FDB With IPv6 Present in Config DB (sonic-net#1059)
[config] Remove _get_breakout_cfg_file_name helper function (sonic-net#1069)
[SHOW][BGP] support show ip(v6) bgp summary for multi asic platform (sonic-net#1064)
[fanshow] Display other fan status, such as Updating (sonic-net#1014)
Add ip_prefix len based on proxy_arp status (sonic-net#1046)
Enable the platform specific ssd firmware upgrade during reboot (sonic-net#954)
[show][cli[show interface portchannel support for Multi ASIC (sonic-net#1005)
support show interface commands for multi ASIC platforms (sonic-net#1006)

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
vdahiya12 added a commit that referenced this pull request Sep 4, 2020
… path to sonic-py-common and update sonic-utilities to comply (#5264)

* [sonic-utilities]update submodule with fix

This PR addresses fixes in sonic-py-common to imitate the behavior inside
sonic-cfggen. Essentially this is a fix for accessing the port-config file.
First check if there is a platform.json file for config generation
and then for legacy port_config.ini.
Also updating the sub-module sonic-utilities.

Fix pfcwd stats crash with invalid queue name (#1077)
[show][bgp]Display the Total number of neighbors in the show ip bgp(v6) summary. (#1079)
[config] Update SONiC Environment Vars When Loading Minigraph (#1073)
Multi asic platform changes for interface, portchannel commands (#878)
Update Command-Reference.md (#1075)
[filter-fdb] Fix Filter FDB With IPv6 Present in Config DB (#1059)
[config] Remove _get_breakout_cfg_file_name helper function (#1069)
[SHOW][BGP] support show ip(v6) bgp summary for multi asic platform (#1064)
[fanshow] Display other fan status, such as Updating (#1014)
Add ip_prefix len based on proxy_arp status (#1046)
Enable the platform specific ssd firmware upgrade during reboot (#954)
[show][cli[show interface portchannel support for Multi ASIC (#1005)
support show interface commands for multi ASIC platforms (#1006)

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
… path to sonic-py-common and update sonic-utilities to comply (sonic-net#5264)

* [sonic-utilities]update submodule with fix

This PR addresses fixes in sonic-py-common to imitate the behavior inside
sonic-cfggen. Essentially this is a fix for accessing the port-config file.
First check if there is a platform.json file for config generation
and then for legacy port_config.ini.
Also updating the sub-module sonic-utilities.

Fix pfcwd stats crash with invalid queue name (sonic-net#1077)
[show][bgp]Display the Total number of neighbors in the show ip bgp(v6) summary. (sonic-net#1079)
[config] Update SONiC Environment Vars When Loading Minigraph (sonic-net#1073)
Multi asic platform changes for interface, portchannel commands (sonic-net#878)
Update Command-Reference.md (sonic-net#1075)
[filter-fdb] Fix Filter FDB With IPv6 Present in Config DB (sonic-net#1059)
[config] Remove _get_breakout_cfg_file_name helper function (sonic-net#1069)
[SHOW][BGP] support show ip(v6) bgp summary for multi asic platform (sonic-net#1064)
[fanshow] Display other fan status, such as Updating (sonic-net#1014)
Add ip_prefix len based on proxy_arp status (sonic-net#1046)
Enable the platform specific ssd firmware upgrade during reboot (sonic-net#954)
[show][cli[show interface portchannel support for Multi ASIC (sonic-net#1005)
support show interface commands for multi ASIC platforms (sonic-net#1006)

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
stepanblyschak pushed a commit to stepanblyschak/sonic-buildimage that referenced this pull request May 10, 2021
…t#1069)

This is part of a larger clean up of functions which return the port_config_file which reside outside of
sonic_py_common packages. This is motivated due to redundancy of code as well as making it easier to change
the default behaviour of helper utility function port_config_file unified and in one place.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants