ansible-collections / cisco.iosxr

Ansible Network Collection for Cisco IOSXR
GNU General Public License v3.0
69 stars 48 forks source link

iosxr_banner : Integration test issue `sudo`: command not found #316

Closed brahmanim closed 1 year ago

brahmanim commented 1 year ago
SUMMARY

When running ios_banner integration tests from Controller with EE container, We get an unexpected error: sudo: command not found, On task Sleep for 30 seconds and continue with play

Update the inventory with the following didn't solve the problem: `

ISSUE TYPE
COMPONENT NAME

cisco.iosxr.iosxr_banner

ANSIBLE VERSION

2.14

COLLECTION VERSION

cisco.iosxr 4.0.3

CONFIGURATION

None

OS / ENVIRONMENT

RP/0/RP0/CPU0:ios#show version Mon Jan 9 17:24:18.717 UTC Cisco IOS XR Software, Version 7.0.2 Copyright (c) 2013-2020 by Cisco Systems, Inc.

Build Information: Built By : ahoang Built On : Fri Mar 13 22:27:54 PDT 2020 Built Host : iox-ucs-029 Workspace : /auto/srcarchive15/prod/7.0.2/xrv9k/ws Version : 7.0.2 Location : /opt/cisco/XR/packages/ Label : 7.0.2

cisco IOS-XRv 9000 () processor System uptime is 1 day 6 hours 57 minutes

STEPS TO REPRODUCE

Run integration iosxr_banner test, the following task failed. See below the actual results.

EXPECTED RESULTS

The task will pass with not errors.

ACTUAL RESULTS

TASK [/usr/share/ansible/collections/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner : Sleep for 30 seconds and continue with play] *** task path: /usr/share/ansible/collections/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/netconf/basic-login.yaml:2 redirecting (type: netconf) ansible.builtin.iosxr to cisco.iosxr.iosxr <10.0.149.88> ESTABLISH LOCAL CONNECTION FOR USER: root <10.0.149.88> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /home/runner/.ansible/tmp/ansible-local-21spv94lus"&& mkdir "echo /home/runner/.ansible/tmp/ansible-local-21spv94lus/ansible-tmp-1673261141.411667-1324-142372305313796" && echo ansible-tmp-1673261141.411667-1324-142372305313796="echo /home/runner/.ansible/tmp/ansible-local-21spv94lus/ansible-tmp-1673261141.411667-1324-142372305313796" ) && sleep 0' Using module file /usr/lib/python3.9/site-packages/ansible/modules/wait_for.py <10.0.149.88> PUT /home/runner/.ansible/tmp/ansible-local-21spv94lus/tmpej6gz3jz TO /home/runner/.ansible/tmp/ansible-local-21spv94lus/ansible-tmp-1673261141.411667-1324-142372305313796/AnsiballZ_wait_for.py <10.0.149.88> EXEC /bin/sh -c 'chmod u+x /home/runner/.ansible/tmp/ansible-local-21spv94lus/ansible-tmp-1673261141.411667-1324-142372305313796/ /home/runner/.ansible/tmp/ansible-local-21spv94lus/ansible-tmp-1673261141.411667-1324-142372305313796/AnsiballZ_wait_for.py && sleep 0' <10.0.149.88> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-hwjiihdooglluqtosxwouofzdbuabobg ; /usr/bin/python3.9 /home/runner/.ansible/tmp/ansible-local-21spv94lus/ansible-tmp-1673261141.411667-1324-142372305313796/AnsiballZ_wait_for.py'"'"' && sleep 0' <10.0.149.88> EXEC /bin/sh -c 'rm -f -r /home/runner/.ansible/tmp/ansible-local-21spv94lus/ansible-tmp-1673261141.411667-1324-142372305313796/ > /dev/null 2>&1 && sleep 0' fatal: [10.0.149.88]: FAILED! => { "changed": false, "module_stderr": "/bin/sh: sudo: command not found\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 127 }

ashwini-mhatre commented 1 year ago

This issue is not reproducible locally. And its not related to iosxr. this issue is seems to be ansible user need to debug with base image used by benni while creating EE