Open nazariig opened 1 year ago
@nazariig , please check if the TACACS server correctly configured on 10.213.103.5:
Mar 20 12:30:31.095774 r-leopard-58 ERR bash: TACACS+: Failed to connecting to 10.213.103.5:49 to request authorization for /usr/bin/dash: Operation now in progress
the TACACS server been installed by following code: https://github.com/sonic-net/sonic-mgmt/blob/master/spytest/utilities/services.py
RUN apt update && apt install tacacs+ -y RUN service tacacs_plus start
Please check if the code running correctly on your test environment.
Description
TACACS returned unexpected result:
Plugin failed to connect to TACACS server:
TACACS+ plugin:
TACACS config:
Testcase:
DASH:
Log:
Steps to reproduce the issue:
SCRIPT=$0 FULL_PATH=$(realpath ${SCRIPT}) SCRIPT_PATH=$(dirname ${FULL_PATH}) BASE_PATH=$(dirname ${SCRIPT_PATH}) LOG_PATH="logs"
export ANSIBLE_CONFIG=${BASE_PATH}/ansible export ANSIBLE_LIBRARY=${BASE_PATH}/ansible/library/ export ANSIBLE_CONNECTION_PLUGINS=${BASE_PATH}/ansible/plugins/connection export ANSIBLE_CLICONF_PLUGINS=${BASE_PATH}/ansible/cliconf_plugins export ANSIBLE_TERMINAL_PLUGINS=${BASE_PATH}/ansible/terminal_plugins
Kill pytest and ansible-playbook process
pkill --signal 9 pytest pkill --signal 9 ansible-playbook
Kill ssh initiated by ansible, try to match full command begins with 'ssh' and contains path '/.ansible'
pkill --signal 9 -f "^ssh.*/.ansible"
rm -fr ${BASE_PATH}/tests/_cache
#
Test
#
TACACS --------------------------------------------------------------------------------------------------------------
HOST="r-leopard-58" TOPO="t1-lag"
py.test tacacs/test_authorization.py \ --inventory="../ansible/inventory,../ansible/veos" --host-pattern ${HOST} --module-path ../ansible/library/ \ --testbed ${HOST}-${TOPO} --testbed_file ../ansible/testbed.csv --allow_recover \ --assert plain --log-cli-level info --show-capture=stdout -ra --showlocals -v \ --clean-alluredir --alluredir=/tmp/allure-results --allure_server_addr="10.215.11.120" \ --skip_sanity --dynamic_update_skip_reason
/usr/bin/dash not authorized by TACACS+ with given arguments, not executing
authorize failed by TACACS+ with given arguments, not executing