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

Changes to Use Redis Unix Socket if the user is root else default to TCP #120

Merged
merged 1 commit into from
Apr 1, 2022

Conversation

abdosi
Copy link
Contributor

@abdosi abdosi commented Apr 1, 2022

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 EVERFLOW is failing if given without sudo. Post this change it is passing.

…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>
@judyjoseph
Copy link
Contributor

LGTM, will check the dbconnector library behavior in sonic-swss-common also, as utilities/scripts use this as well.

@abdosi abdosi merged commit 653bdba into sonic-net:master Apr 1, 2022
@abdosi abdosi deleted the sudo_access branch April 1, 2022 17:47
@qiluo-msft
Copy link
Contributor

Agree. Please make sonic-swss-common implementation of SonicV2Connector on-par.


In reply to: 1086176608

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.

'show acl table' as user guest user gives permission denied error
4 participants