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

Fix for LLDP portname exposed as MAC address bug #3152

Merged
merged 8 commits into from
Jul 17, 2019
Merged

Fix for LLDP portname exposed as MAC address bug #3152

merged 8 commits into from
Jul 17, 2019

Conversation

sumukhatv
Copy link
Contributor

- What I did
Fixed the LLDP portname bug
- How I did it
By subscribing to notifications from APP DB and Config DB to apply the lldp port config command
- How to verify it
We should not see portname as MAC address in the lldp messages
- Description for the changelog

Subscribe to Config DB and Application DB to get notifications to apply the LLDP port config correctly

- A picture of a cute animal (not mandatory but encouraged)

Sumukha Tumkur Vani added 2 commits July 12, 2019 16:15
to get notifications to apply LLDP port config
Removing this since it is not serving any purpose
Copy link
Contributor

@jleveque jleveque left a comment

Choose a reason for hiding this comment

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

As comments. Also, please add a few more comments in the code to briefly explain the new logic.

dockers/docker-lldp-sv2/lldpmgrd Outdated Show resolved Hide resolved
dockers/docker-lldp-sv2/lldpmgrd Outdated Show resolved Hide resolved
dockers/docker-lldp-sv2/lldpmgrd Outdated Show resolved Hide resolved
dockers/docker-lldp-sv2/lldpmgrd Outdated Show resolved Hide resolved
dockers/docker-lldp-sv2/lldpmgrd Show resolved Hide resolved
dockers/docker-lldp-sv2/lldpmgrd Outdated Show resolved Hide resolved
dockers/docker-lldp-sv2/lldpmgrd Outdated Show resolved Hide resolved
This is not prteset in Config DB
@lguohan
Copy link
Collaborator

lguohan commented Jul 16, 2019

retest mellanox please

@lguohan
Copy link
Collaborator

lguohan commented Jul 16, 2019

retest vs please

log_info("Port name {} oper status: {}".format(port_name, port_oper_status))
return port_oper_status == "up"
else:
log_error("Port name {} does not have key oper_status".format(port_name))
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's don't output any error here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For multiple cases we return False. Outputting an error message is the only way to find out the reason for False.


In reply to: 304107933 [](ancestors = 304107933)

Copy link
Contributor

Choose a reason for hiding this comment

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

That key should always be present. I think this log message is helpful for catching unexpected circumstances.

Copy link
Contributor

Choose a reason for hiding this comment

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

The key will not be presented when we creating this table.
So on sonic initialization you can catch some "errors" here.
I think it's not an error at all.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good point. We might see some false alarms at boot time and when reloading config. Maybe it is better to simply remove it.


# handle config change
if (fvp_dict.has_key("alias") or fvp_dict.has_key("description")):
if op in ["SET", "DEL"]:
Copy link
Contributor

Choose a reason for hiding this comment

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

can we combine two ifs into one?

@sumukhatv sumukhatv merged commit ac9934a into sonic-net:master Jul 17, 2019
@sumukhatv sumukhatv deleted the lldp_portname branch July 17, 2019 23:04
sumukhatv pushed a commit that referenced this pull request Jul 18, 2019
The permissions got changed inadverently in this PR: #3152
yxieca pushed a commit that referenced this pull request Jul 19, 2019
* Subscribe to both ConfigDB and AppDB
to get notifications to apply LLDP port config

* the operstate file is not consistent
Removing this since it is not serving any purpose

* Remove check for PortInitDone and PortConfigDone
This is not prteset in Config DB

* Remove checking State DB for port creation

* Check for key to be present before fetching it

* Addressing review comments
yxieca pushed a commit that referenced this pull request Jul 19, 2019
The permissions got changed inadverently in this PR: #3152
mssonicbld added a commit that referenced this pull request Jun 11, 2024
…lly (#19273)

#### Why I did it
src/sonic-swss
```
* 70eb7663 - (HEAD -> master, origin/master, origin/HEAD) ADD VOQ COUNTERS(SAI_SWITCH_STAT_PACKET_INTEGRITY_DROP, SAI_QUEUE_ST…T_CREDIT_WD_DELETED_PACKETS) support for VOQ/Fabric switches (#3152) (10 hours ago) [saksarav-nokia]
```
#### How I did it
#### How to verify it
#### Description for the changelog
mssonicbld added a commit that referenced this pull request Jul 13, 2024
…lly (#19554)

#### Why I did it
src/sonic-swss
```
* d3073b7c - (HEAD -> 202405, origin/202405) [muxorch] Fixing bug with updateRoute and mux neighbors (#3187) (19 hours ago) [Nikola Dancejic]
* b16d6b2a - ADD VOQ COUNTERS(SAI_SWITCH_STAT_PACKET_INTEGRITY_DROP, SAI_QUEUE_ST…T_CREDIT_WD_DELETED_PACKETS) support for VOQ/Fabric switches (#3152) (19 hours ago) [saksarav-nokia]
* 12a95e57 - Revamp module build script to make it work for 5.15 on Ubuntu 20.04 (#3212) (19 hours ago) [Saikrishna Arcot]
* 87cf38e0 - Fix in switchorch: unsupported attribute causes skipping of processing the rest of configurations (#3209) (19 hours ago) [Amir]
* 8f333b69 - [subnet decap] Support decap rule generation based on T0 VIP route (#3183) (5 weeks ago) [Longxiang Lyu]
* 9bcb9b6e - Fixing appl_db FABRIC_MONITOR notification issue. (#3176) (5 weeks ago) [jfeng-arista]
* fff544e6 - Rotate record file before writing new log. (#3158) (5 weeks ago) [mint570]
* 80f52079 - Add SWSS support for link event damping feature (#2933) (5 weeks ago) [Roy Yi]
* b3ebfc46 - [muxorch] Using bulker to program routes/neighbors during switchover (#3148) (5 weeks ago) [Nikola Dancejic]
```
#### How I did it
#### How to verify it
#### Description for the changelog
arun1355492 pushed a commit to arun1355492/sonic-buildimage that referenced this pull request Jul 26, 2024
…lly (sonic-net#19273)

#### Why I did it
src/sonic-swss
```
* 70eb7663 - (HEAD -> master, origin/master, origin/HEAD) ADD VOQ COUNTERS(SAI_SWITCH_STAT_PACKET_INTEGRITY_DROP, SAI_QUEUE_ST…T_CREDIT_WD_DELETED_PACKETS) support for VOQ/Fabric switches (sonic-net#3152) (10 hours ago) [saksarav-nokia]
```
#### How I did it
#### How to verify it
#### Description for the changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants