-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[redis] Add redis Group And Grant Read/Write Access to Members #5289
[redis] Add redis Group And Grant Read/Write Access to Members #5289
Conversation
sonic-cfggen is now using Unix Domain Socket for Redis DB. The socket is created using root account. Subsequently, services that are started as admin fails to start. This PR creates redis group and add admin user to redis group. It also grants read/write access on redis.sock for redis group members. signed-off-by: Tamer Ahmed <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Please wait for other reviewers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but wait for others
5a14b5f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok with multi-asic platform. One observation though I don't see this new redis group inside the docker. But I feel it is ok as long as the owner is root.
admin@str--acs-1:~$ docker exec -it database bash
root@str--acs-1:/# ls -la /var/run/redis/redis.sock
srwxrw---- 1 root 1000 0 Sep 3 05:29 /var/run/redis/redis.sock
docker has user |
sonic-cfggen is now using Unix Domain Socket for Redis DB. The socket is created using root account. Subsequently, services that are started as admin fails to start. This PR creates redis group and add admin user to redis group. It also grants read/write access on redis.sock for redis group members. signed-off-by: Tamer Ahmed <[email protected]>
…-net#5289) sonic-cfggen is now using Unix Domain Socket for Redis DB. The socket is created using root account. Subsequently, services that are started as admin fails to start. This PR creates redis group and add admin user to redis group. It also grants read/write access on redis.sock for redis group members. signed-off-by: Tamer Ahmed <[email protected]>
…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 <[email protected]>
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
…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 <[email protected]>
9ce4d19d5a199cffe2933d80e343a80ded398b4a (HEAD -> 201911, origin/201911) With the changes in PR:#5289 access to redis 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: #7002 where we default to use TCP for Redis if user is not root Signed-off-by: Abhishek Dosi <[email protected]>
78f167e4728f939712b3f3ea550949e2ea675fec With the changes in PR:sonic-net#5289 access to redis 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#7002 where we default to use TCP for Redis if user is not root Signed-off-by: Abhishek Dosi <[email protected]>
*[Submodule update] sonic-py-swssdk 78f167e4728f939712b3f3ea550949e2ea675fec With the changes in PR:#5289 access to redis 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: #7002 where we default to use TCP for Redis if user is not root Signed-off-by: Abhishek Dosi <[email protected]>
sonic-cfggen is now using Unix Domain Socket for Redis DB. The socket
is created using root account. Subsequently, services that are started
as admin fail to start. This PR creates redis group and add admin
user to redis group. It also grants read/write access on redis.sock
for redis group members.
closes #5277
resolves #5277
signed-off-by: Tamer Ahmed [email protected]
- Why I did it
Access to redis.sock fails when using admin account
- How I did it
Added
redis
groupChanged
redis.sock
group to the new groupredis
Gave read/write access to
redis
group onredis.sock
- How to verify it
without this change
with this change
- Which release branch to backport (provide reason below if selected)
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)