Fix PING database command not return bool string issue. #650
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
Fix sonic-db-cli issue on chassis:
[chassis]After sonic-db-cli C++ implementation, database.sh fails to start database-chassis on Supervisor card
sonic-net/sonic-buildimage#11473
The reason of this issue is because c++ version sonic-db-cli output different with python version:
Here is Python version result:
admin@vlab-01:
$ /usr/local/bin/sonic-db-cli -s PING$ /usr/local/bin/sonic-db-cli STATE_DB PINGPONG
admin@vlab-01:
True
Here is c++ version result:
admin@vlab-01:
$ /usr/local/sonic-db-cli -s PING$ /usr/local/sonic-db-cli STATE_DB PINGPONG
admin@vlab-01:
PONG
How I did it
Change RedisReply::formatReply() to return bool string for PING command.
How to verify it
Pass all test case.
Add new UT cover change.
Which release branch to backport (provide reason below if selected)
Description for the changelog
Fix sonic-db-cli issue on chassis:
[chassis]After sonic-db-cli C++ implementation, database.sh fails to start database-chassis on Supervisor card
sonic-net/sonic-buildimage#11473
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)