-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[multi-asic] sudo not required explicitly as /bin/ip netns identify present in sudoers #16115
Conversation
…D_ONLY_CMDS in sudoers file
To add more details Have tested this change with/without RW Jit, show commands are ok in multi-asic. Checking why the sudo was added earlier : it was part of Pull Request #6100 -- related to process_checker and monit. I see that currently we don't use the process checker, we use the supervisorctl proc_listener to find a critical process exit. |
@judyjoseph , please add ado, thanks. |
In the interest of time, I created the MAFT ADO... |
@yxieca , @StormLiangMS please help cherry-pick to back port this fix to the corresponding releases. |
Thank you @gechiang |
@judyjoseph PR conflicts with 202205 branch |
…D_ONLY_CMDS in sudoers file (sonic-net#16115) Why I did it Few commands in multiasic platforms when run with the "sudo ip netns exec asic0 " option was taking like 15 mins to get the o/p. This behavior of sudo getting hung was seen by just doing this jujoseph@svcstr-server-2:~ sudo ip netns exec asic0 bash jujoseph@svcstr-server-2:~ sudo ls deally sudo is not needed as we have /bin/ip netns identify present in /etc/sudoers file. Hence removing it
Cherry-pick PR to 202211: #16255 |
@judyjoseph cherry pick PR didn't pass PR checker. Please check!!! Auto cherry pick PR will be closed in 24 days. |
@judyjoseph cherry pick PR didn't pass PR checker. Please check!!! Auto cherry pick PR will be closed in 24 days. |
1 similar comment
@judyjoseph cherry pick PR didn't pass PR checker. Please check!!! Auto cherry pick PR will be closed in 24 days. |
…D_ONLY_CMDS in sudoers file (#16115) Why I did it Few commands in multiasic platforms when run with the "sudo ip netns exec asic0 " option was taking like 15 mins to get the o/p. This behavior of sudo getting hung was seen by just doing this jujoseph@svcstr-server-2:~ sudo ip netns exec asic0 bash jujoseph@svcstr-server-2:~ sudo ls deally sudo is not needed as we have /bin/ip netns identify present in /etc/sudoers file. Hence removing it
…D_ONLY_CMDS in sudoers file (sonic-net#16115) Why I did it Few commands in multiasic platforms when run with the "sudo ip netns exec asic0 " option was taking like 15 mins to get the o/p. This behavior of sudo getting hung was seen by just doing this jujoseph@svcstr-server-2:~ sudo ip netns exec asic0 bash jujoseph@svcstr-server-2:~ sudo ls deally sudo is not needed as we have /bin/ip netns identify present in /etc/sudoers file. Hence removing it
Cherry-pick PR to 202305: #16409 |
…D_ONLY_CMDS in sudoers file (#16115) Why I did it Few commands in multiasic platforms when run with the "sudo ip netns exec asic0 " option was taking like 15 mins to get the o/p. This behavior of sudo getting hung was seen by just doing this jujoseph@svcstr-server-2:~ sudo ip netns exec asic0 bash jujoseph@svcstr-server-2:~ sudo ls deally sudo is not needed as we have /bin/ip netns identify present in /etc/sudoers file. Hence removing it
…D_ONLY_CMDS in sudoers file (sonic-net#16115) Why I did it Few commands in multiasic platforms when run with the "sudo ip netns exec asic0 " option was taking like 15 mins to get the o/p. This behavior of sudo getting hung was seen by just doing this jujoseph@svcstr-server-2:~ sudo ip netns exec asic0 bash jujoseph@svcstr-server-2:~ sudo ls deally sudo is not needed as we have /bin/ip netns identify present in /etc/sudoers file. Hence removing it
Why I did it
Few commands in multiasic platforms when run with the "sudo ip netns exec asic0 " option was taking like 15 mins to get the o/p. This behavior of sudo getting hung was seen by just doing this
jujoseph@svcstr-server-2:~ sudo ip netns exec asic0 bash
jujoseph@svcstr-server-2:~ sudo ls
Work item tracking
How I did it
The reason was found that when a show command is issued, there is an API to get the current namespace
and we were doing it with sufo prefixed. This was ok with usually show commands which is issued in linux host, but when issued with "sudo ip netns exec asic0" prefix ( i.e the command is executed in a linux network namespace ) sudo gets hung adding to overall delay to command o/p
Ideally sudo is not needed as we have /bin/ip netns identify present in /etc/sudoers file. Hence removing it
How to verify it
Verified with both RO and RW user in a multi-asic platform, confirmed the show commands work, and "sudo ip netns exec asic0 " command returns result quicker.
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)