sonic-mgmt
sonic-mgmt copied to clipboard
Fix duplicate entry of admin user in the tacacs config
Description of PR
PR11614 adds two new sets of credentials to the tacplus authentication config, "duthost_admin_user" and "ansible_ssh_user", however in our testbed set-up, these are both the DUT admin user, causing problems due to duplicate tacplus config. The observed behavior is as described in https://github.com/sonic-net/sonic-mgmt/issues/13708
This PR adds a check for whether ansible_ssh_user is the same as duthost_admin_user, preventing duplicate config.
Summary: Fixes #13708
Type of change
- [x] Bug fix
- [ ] Testbed and Framework(new/improvement)
- [ ] Test case(new/improvement)
Back port request
- [ ] 202012
- [ ] 202205
- [ ] 202305
- [ ] 202311
- [x] 202405
Approach
What is the motivation for this PR?
Investigating the cause of sonic-mgmt tacacs test fails on 202405, determined it was caused by duplicate user entry in tacplus config.
How did you do it?
How did you verify/test it?
After this change, all the tacacs sonic-mgmt tests pass for us in 202405.