[Chassis][multiasic] Fix the sonic-db-cli core files issue on multiasic platform after the c++ implementation of sonic-db-cli#13207
Merged
rlhui merged 1 commit intosonic-net:masterfrom Feb 21, 2023
Conversation
Contributor
Author
|
@rlhui @judyjoseph @abdosi After 202205 branch uses the c++ implementation of the sonic-db-cli, even with PR sonic-net/sonic-swss-common#701, database.sh still generates many core files. This PR will address this core files issue. Please review it. |
liuh-80
reviewed
Jan 13, 2023
Contributor
There was a problem hiding this comment.
The crash is not cause by a behavior change, python version sonic-db-cli also crash in this case, access name space DB need name space config file ready.
liuh-80
approved these changes
Jan 13, 2023
Collaborator
|
/azp run |
|
You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list. |
qiluo-msft
approved these changes
Jan 17, 2023
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
judyjoseph
reviewed
Jan 18, 2023
judyjoseph
reviewed
Feb 13, 2023
871c6ef to
a47d0ec
Compare
…ic platform after the c++ implementation of sonic-db-cli Signed-off-by: mlok <marty.lok@nokia.com>
a47d0ec to
9f36c25
Compare
judyjoseph
approved these changes
Feb 14, 2023
Contributor
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
This PR needs to be marked "request for 202205" |
Collaborator
|
@mlok-nokia @judyjoseph Please add request for 202211 |
mssonicbld
pushed a commit
to mssonicbld/sonic-buildimage
that referenced
this pull request
Mar 6, 2023
…ic platform after the c++ implementation of sonic-db-cli (sonic-net#13207) Fixe sonic-net#12047. After the c++ implementation of the sonic-db-cli, sonic-db-cli PING command tries to initialize the global database for all instances database starting. If all instance database-config.json are not ready yet. it will crash and generate core file. PR sonic-net/sonic-swss-common#701 only fix the crash and the process abortion. Signed-off-by: mlok <marty.lok@nokia.com>
Collaborator
|
Cherry-pick PR to 202205: #14108 |
mssonicbld
pushed a commit
that referenced
this pull request
Mar 7, 2023
…ic platform after the c++ implementation of sonic-db-cli (#13207) Fixe #12047. After the c++ implementation of the sonic-db-cli, sonic-db-cli PING command tries to initialize the global database for all instances database starting. If all instance database-config.json are not ready yet. it will crash and generate core file. PR sonic-net/sonic-swss-common#701 only fix the crash and the process abortion. Signed-off-by: mlok <marty.lok@nokia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why I did it
Fixe #12047. After the c++ implementation of the sonic-db-cli, sonic-db-cli PING command tries to initialize the global database for all instances database starting. If all instance database-config.json are not ready yet. it will crash and generate core file. PR sonic-net/sonic-swss-common#701 only fix the crash and the process abortion. With this PR, many core files are still generated:
The following error are logged in the syslog
The following core files are generated
How I did it
In the database.sh, call function waitForAllInstanceDatabaseConfigJsonFilesReady to make sure all instance database-config.json are present before the command sonic-db-cli PING. This will avoid the database-config,json doesn't exist and cause errors and generate the core file.
How to verify it
With this change, after the image install and boot up, check and verify the syslog, the following lines should not be in the syslog and this related core file should not be seen.
'''
Dec 28 16:44:34.811893 ixre-cpm-chassis8 ERR sonic-db-cli: :- parseDatabaseConfig: Sonic database config file doesn't exist at /var/run/redis/sonic-db/../../redis0/sonic-db/database_config.json
Dec 28 16:44:34.812099 ixre-cpm-chassis8 ERR sonic-db-cli: :- initializeGlobalConfig: Sonic database config file syntax error >> Sonic database config file doesn't exist at /var/run/redis/sonic-db/../../redis0/sonic-db/database_config.json
Dec 28 16:44:34.812162 ixre-cpm-chassis8 INFO database.sh[5764]: terminate called after throwing an instance of 'std::runtime_error'
Dec 28 16:44:34.812215 ixre-cpm-chassis8 INFO database.sh[5764]: what(): Sonic database config file syntax error >> Sonic database config file doesn't exist at /var/run/redis/sonic-db/../../redis0/sonic-db/database_config.json
'''
Which release branch to backport (provide reason below if selected)
Description for the changelog
Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)