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 PING database command not return bool string issue. #650

Merged
merged 1 commit into from
Jul 21, 2022

Conversation

liuh-80
Copy link
Contributor

@liuh-80 liuh-80 commented Jul 19, 2022

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
PONG
admin@vlab-01:
$ /usr/local/bin/sonic-db-cli STATE_DB PING
True

Here is c++ version result:
admin@vlab-01:$ /usr/local/sonic-db-cli -s PING
PONG
admin@vlab-01:
$ /usr/local/sonic-db-cli STATE_DB PING
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)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

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)

@qiluo-msft
Copy link
Contributor

Could you fix the markdown of the PR description? It is rendered not well on webpage.

@liuh-80 liuh-80 merged commit 4132d14 into sonic-net:master Jul 21, 2022
yxieca pushed a commit that referenced this pull request Aug 8, 2022
… issue. (#650)

#### 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
PONG
admin@vlab-01:~$ /usr/local/bin/sonic-db-cli STATE_DB PING
True

Here is c++ version result:
admin@vlab-01:~$ /usr/local/sonic-db-cli -s PING
PONG
admin@vlab-01:~$ /usr/local/sonic-db-cli STATE_DB PING
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)

<!--
- Note we only backport fixes to a release branch, *not* features!
- Please also provide a reason for the backporting below.
- e.g.
- [x] 202006
-->

- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106
- [x] 202111

#### 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)
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