Changes to Use Redis Unix Socket if the user is root else default to TCP#120
Merged
abdosi merged 1 commit intosonic-net:masterfrom Apr 1, 2022
Merged
Changes to Use Redis Unix Socket if the user is root else default to TCP#120abdosi merged 1 commit intosonic-net:masterfrom
abdosi merged 1 commit intosonic-net:masterfrom
Conversation
…s unix socket is given to the redis group members. Many of sonic-util commands (especially in multi-asic) case use redis unix socket to connect to DB and thus those comamnd fails without providing sudo. This PR is continuation of PR: sonic-net/sonic-buildimage#7002 where we default to use TCP for Redis if user is not root Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
lguohan
approved these changes
Apr 1, 2022
Contributor
|
LGTM, will check the dbconnector library behavior in sonic-swss-common also, as utilities/scripts use this as well. |
judyjoseph
approved these changes
Apr 1, 2022
Contributor
|
Agree. Please make sonic-swss-common implementation of SonicV2Connector on-par. In reply to: 1086176608 |
Closed
6 tasks
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.
What I did:
Changes to Use Redis Unix Socket if the user is root else default to TCP
Why I did:
With the changes in PR:sonic-net/sonic-buildimage#5289 access to redis unix socket is given to the redis group members or to the root. Many of sonic-util commands (especially in multi-asic) case use redis unix socket to connect to DB and thus those comamnd fails without providing sudo. This PR is continuation of PR: sonic-net/sonic-buildimage#7002 where we default to use TCP for Redis if user is not root in sonic-cfggen.
This should fix: sonic-net/sonic-buildimage#8501
How I did:
Without this change
acl-loader update full erspan_acl_rule_del.json --table_name EVERFLOWis failing if given without sudo. Post this change it is passing.