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

EEPROM "application advertisement" cannot display customized informat… #394

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

chiourung
Copy link
Contributor

…ion.

Description

Can't show all application advertisement for CISCO ZR. For CISCO ZR, it use Vendor specific ID for module_media_interface_id

Motivation and Context

  1. Add mapping for Host Electrical and Media Interface IDs
  2. return code information when can't get the definition

How Has This Been Tested?

Use get_application_advertisement() to verify:
{
"1": {
"host_electrical_interface_id": "400GAUI-8 C2M (Annex 120E)",
"host_lane_assignment_options": 1,
"host_lane_count": 8,
"media_lane_assignment_options": 1,
"media_lane_count": 1,
"module_media_interface_id": "400ZR, DWDM, amplified"
},
"2": {
"host_electrical_interface_id": "400GAUI-8 C2M (Annex 120E)",
"host_lane_assignment_options": 1,
"host_lane_count": 8,
"media_lane_assignment_options": 1,
"media_lane_count": 1,
"module_media_interface_id": "400ZR, Single Wavelength, Unamplified"
},
"3": {
"host_electrical_interface_id": "100GAUI-2 C2M (Annex 135G)",
"host_lane_assignment_options": 85,
"host_lane_count": 2,
"media_lane_assignment_options": 1,
"media_lane_count": 1,
"module_media_interface_id": "400ZR, DWDM, amplified"
},
"4": {
"host_electrical_interface_id": "400GAUI-8 C2M (Annex 120E)",
"host_lane_assignment_options": 1,
"host_lane_count": 8,
"media_lane_assignment_options": 1,
"media_lane_count": 1,
"module_media_interface_id": "Vendor specific: 197"
},
"5": {
"host_electrical_interface_id": "400GAUI-8 C2M (Annex 120E)",
"host_lane_assignment_options": 1,
"host_lane_count": 8,
"media_lane_assignment_options": 1,
"media_lane_count": 1,
"module_media_interface_id": "Vendor specific: 192"
},
"6": {
"host_electrical_interface_id": "100GAUI-2 C2M (Annex 135G)",
"host_lane_assignment_options": 85,
"host_lane_count": 2,
"media_lane_assignment_options": 1,
"media_lane_count": 1,
"module_media_interface_id": "Vendor specific: 192"
},
"7": {
"host_electrical_interface_id": "100GAUI-2 C2M (Annex 135G)",
"host_lane_assignment_options": 85,
"host_lane_count": 2,
"media_lane_assignment_options": 1,
"media_lane_count": 1,
"module_media_interface_id": "Vendor specific: 193"
},
"8": {
"host_electrical_interface_id": "400GAUI-8 C2M (Annex 120E)",
"host_lane_assignment_options": 1,
"host_lane_count": 8,
"media_lane_assignment_options": 1,
"media_lane_count": 1,
"module_media_interface_id": "Vendor specific: 206"
},
"9": {
"host_electrical_interface_id": "100GAUI-2 C2M (Annex 135G)",
"host_lane_assignment_options": 85,
"host_lane_count": 2,
"media_lane_assignment_options": 1,
"media_lane_count": 1,
"module_media_interface_id": "Vendor specific: 206"
},
"10": {
"host_electrical_interface_id": "100GAUI-2 C2M (Annex 135G)",
"host_lane_assignment_options": 85,
"host_lane_count": 2,
"media_lane_assignment_options": 1,
"media_lane_count": 1,
"module_media_interface_id": "Vendor specific: 207"
},
"11": {
"host_electrical_interface_id": "100GAUI-2 C2M (Annex 135G)",
"host_lane_assignment_options": 85,
"host_lane_count": 2,
"media_lane_assignment_options": 1,
"media_lane_count": 1,
"module_media_interface_id": "Vendor specific: 194"
},
"12": {
"host_electrical_interface_id": "CAUI-4 C2M (Annex 83E) without FEC",
"host_lane_assignment_options": 17,
"host_lane_count": 4,
"media_lane_assignment_options": 1,
"media_lane_count": 1,
"module_media_interface_id": "Vendor specific: 194"
},
"13": {
"host_electrical_interface_id": "100GAUI-2 C2M (Annex 135G)",
"host_lane_assignment_options": 85,
"host_lane_count": 2,
"media_lane_assignment_options": 1,
"media_lane_count": 1,
"module_media_interface_id": "Vendor specific: 196"
},
"14": {
"host_electrical_interface_id": "CAUI-4 C2M (Annex 83E) without FEC",
"host_lane_assignment_options": 17,
"host_lane_count": 4,
"media_lane_assignment_options": 1,
"media_lane_count": 1,
"module_media_interface_id": "Vendor specific: 196"
}
}
Edit
Delete

…ion.

Can't show all application advertisement for CISCO ZR.
For CISCO ZR, it use Vendor specific ID for module_media_interface_id

Solution:
1. Add mapping for Host Electrical and Media Interface IDs
2. return code information when can't get the definition

Signed-off-by: chiourung_huang <chiourung_huang@edge-core.com>
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-platform-common that referenced this pull request Oct 25, 2024
…t#394)

Description
Following changes are done in this PR
- In line card pmon:chassisd:
- line card's hostname and number of asics is pushed to a new table CHASSIS_MODULE_TABLE in chassis state db in redis_chassis server. The hostname and number of asics are required to clean up chassis add db. 'hostname' and asic name are used to construct key for chassis app db entries.
- In supervisor pomon:chassisd:
- When midplane connectivity loss is deteced, error syslog is generated. No chassis app db clean up is done for midplane connectivity loss.
- When a module goes down and if it is in down state for more than 30 minutes, chassis app db clean up is done for all the asics of the module that went down. As part of the clean up entries created by all the asics of the down module are deleted from the following tables in chassis app db in redis_chassis server in supervisor.
(1) SYSTEM_NEIGH
(2) SYSTEM_INTERFACE
(3) SYSTEM_LAG_MEMBER_TABLE
(4) SYSTEM_LAG_TABLE
The LAG IDs used by the asics of the down module are also de-allocated from SYSTEM_LAG_ID_TABLE and SYSTEM_LAG_ID_SET.

Motivation and Context
In an operational system, if a line card is brought down the entries created by the down line card are still present in the chassis db and hence the corresponding voq system entries (such as system interface, systen neighbor and so on ) in all other line cards. These stale entries may affect the accuracy of the current entries. To fix this, we cleanup the chassis db for all asics of a given line card that is detected to be down for a long period of time.

How Has This Been Tested?
After the chassis is up with a line card
(1) Pull out the line card. Notice the error log message indicating line card down. Re-insert the line card/Bring up the line card within 30 minutes and observe that the chassis db entries created by this line card are not cleaned.
(2) Pull out the line card. Notice the erroe log message indicating line card down. After more than 30 minutes, observe that the chassis db does not have entries created by the removed line card.
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.

3 participants