Skip to content

Wait till CHASIS_APP_DB PING is successful, host_name and asic_name …#341

Merged
gechiang merged 1 commit intoAzure:202205from
gechiang:202205
Apr 20, 2024
Merged

Wait till CHASIS_APP_DB PING is successful, host_name and asic_name …#341
gechiang merged 1 commit intoAzure:202205from
gechiang:202205

Conversation

@gechiang
Copy link
Copy Markdown
Contributor

…are valid in CONIFG_DB before starting chassis-db-cleanup (#17962)

This PR fixes the issue reported in Issu #17945
We noticed that chassis db clean up is skipped sometimes when the CHASSIS_APP_DB PING fails. Also if host_name and asic_name are not written to CONIG_DB, it could pass the empty strings to CHASSIS_APP_DB EVAL commands. The service hostname-config.service is restarted whenever the config-reload or load-minigraph is done and this services renames the file /etc/hosts to updates it with the new file. This interferes with [email protected] and when swss.sh script CHASSIS_APP_DPP when the /etc/hosts file is renamed, the error "Unable to connect to redis: Cannot assign requested address" is seen and the CHASSIS_APP_DB EVAL command fails. This causes the chassis db entries not getting cleaned up and causes orchagent crash in remote LC's.


Why I did it

Work item tracking
  • Microsoft ADO (number only):

How I did it

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

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

…re valid in CONIFG_DB before starting chassis-db-cleanup (#17962)

This PR fixes the issue reported in Issu #17945
We noticed that chassis db clean up is skipped sometimes when the CHASSIS_APP_DB PING fails. Also if host_name and asic_name are not written to CONIG_DB, it could pass the empty strings to CHASSIS_APP_DB EVAL commands.
The service hostname-config.service is restarted whenever the config-reload or load-minigraph is done and this services renames the file /etc/hosts to updates it with the new file. This interferes with [email protected] and when swss.sh script CHASSIS_APP_DPP when the /etc/hosts file is renamed, the error "Unable to connect to redis: Cannot assign requested address" is seen and the CHASSIS_APP_DB EVAL command fails. This causes the chassis db entries not getting cleaned up and causes orchagent crash in remote LC's.

---------

Signed-off-by: saksarav <[email protected]>
@gechiang gechiang requested a review from lguohan as a code owner April 20, 2024 01:00
@gechiang gechiang requested a review from judyjoseph April 20, 2024 01:01
@gechiang
Copy link
Copy Markdown
Contributor Author

This is to cherry-pick this fix (sonic-net/sonic-buildimage#17962) to msft repo 202205 branch

@gechiang gechiang merged commit a820fe0 into Azure:202205 Apr 20, 2024
@gechiang gechiang deleted the 202205 branch April 20, 2024 01:20
prabhataravind pushed a commit that referenced this pull request Jul 7, 2025
…lly (#21699)

#### Why I did it
src/sonic-gnmi
```
* 1425d56 - (HEAD -> master, origin/master, origin/HEAD) Update incremental config to support multi-asic (#355) (64 minutes ago) [ganglv]
* 22f767f - Merge pull request #341 from SuvarnaMeenakshi/fabric_masic (6 hours ago) [SuvarnaMeenakshi]
* d3261f6 - Fix as per review comment (3 days ago) [Suvarna Meenakshi]
* d7b74a5 - Modify to use environment variable to specify unit test env (6 days ago) [Suvarna Meenakshi]
* 812b1d0 - Use global variable UnitTest as a flag to reinit fabric counters if invoked during unit testing (6 days ago) [Suvarna Meenakshi]
* c4fe5c4 - Merge remote-tracking branch 'origin/master' into HEAD (11 days ago) [Suvarna Meenakshi]
* bad1f4a - Remove clean up added for debug (11 days ago) [Suvarna Meenakshi]
* 5d7586d - Fix incorrect char and space (11 days ago) [Suvarna Meenakshi]
* 697005d - Fix white space (11 days ago) [Suvarna Meenakshi]
* c2fae6d - Revert "Fix whitespace" (11 days ago) [Suvarna Meenakshi]
* 29ffb43 - Fix whitespace (11 days ago) [Suvarna Meenakshi]
* 8440cdb - Fix comment (11 days ago) [Suvarna Meenakshi]
* e12240c - Add comment (11 days ago) [Suvarna Meenakshi]
* 5820035 - Update to reset countersFabricPortNameMap (11 days ago) [Suvarna Meenakshi]
* 4c38c8d - Remove empty line (11 days ago) [Suvarna Meenakshi]
* c3fa03d - Remove debug prints (11 days ago) [Suvarna Meenakshi]
* 583707b - Fix white space add comment as per review comment (12 days ago) [Suvarna Meenakshi]
* 4555836 - Fix whitespace (12 days ago) [Suvarna Meenakshi]
* 728c3d9 - Add unit test (12 days ago) [Suvarna Meenakshi]
* 3246434 - Revert "Add unit-test" (12 days ago) [Suvarna Meenakshi]
* e90e6cd - Add unit-test (12 days ago) [Suvarna Meenakshi]
* 65187b8 - Modify to work for single asic linecard (3 weeks ago) [Suvarna Meenakshi]
* 76314e3 - Merge remote-tracking branch 'origin/master' into fabric_masic (3 weeks ago) [Suvarna Meenakshi]
* 316a491 - Modify Fabric port name to append asic namespace to form unique port name within a linecard module (3 weeks ago) [Suvarna Meenakshi]
* 8ff0269 - Add multi-asic support for Fabric port counters (4 weeks ago) [Suvarna Meenakshi]
```
#### How I did it
#### How to verify it
#### Description for the changelog
prabhataravind pushed a commit that referenced this pull request Jul 7, 2025
…atically (#21913)

#### Why I did it
src/sonic-snmpagent
```
* 25f9e4f - (HEAD -> master, origin/master, origin/HEAD) Handle error seen when interface counter is not available in COUNTERS_DB (#341) (25 hours ago) [SuvarnaMeenakshi]
```
#### 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants