Skip to content
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

os10_command show tech-support fails #152

Open
jay-henriques opened this issue Oct 5, 2023 · 3 comments
Open

os10_command show tech-support fails #152

jay-henriques opened this issue Oct 5, 2023 · 3 comments

Comments

@jay-henriques
Copy link

SUMMARY

We recently upgrade our ansible from v2.9.10 to ansible-core 2.15 and ansible-community 8.1.0 and show tech-support command fails

ISSUE TYPE
  • Bug Report
COMPONENT NAME

os10_command module with an adhoc command - ansible -i -m dellemc.os10.os10_command -a "commands='show tech-support'" '' -vvvv

ANSIBLE VERSION
ansible [core 2.15.3]
  config file = /Users/jhenri201/gitrepo/vxrail-automation/switch/ansible.cfg
  configured module search path = ['/Users/jhenri201/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/jhenri201/.venv/vxrail-automation-python311/lib/python3.11/site-packages/ansible
  ansible collection location = /Users/jhenri201/gitrepo/vxrail-automation/switch
  executable location = /Users/jhenri201/.venv/vxrail-automation-python311/bin/ansible
  python version = 3.11.3 (main, Apr  7 2023, 19:30:05) [Clang 13.0.0 (clang-1300.0.29.30)] (/Users/jhenri201/.venv/vxrail-automation-python311/bin/python3.11)
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION

# /Users/jhenri201/gitrepo/vxrail-automation/switch/ansible_collections
Collection   Version
------------ -------
dellemc.os10 1.2.0  
CONFIGURATION
CACHE_PLUGIN(/Users/jhenri201/gitrepo/vxrail-automation/switch/ansible.cfg) = jsonfile
CACHE_PLUGIN_CONNECTION(/Users/jhenri201/gitrepo/vxrail-automation/switch/ansible.cfg) = /tmp/vxrail-automation-facts
COLLECTIONS_PATHS(/Users/jhenri201/gitrepo/vxrail-automation/switch/ansible.cfg) = ['/Users/jhenri201/gitrepo/vxrail-automation/switch']
CONFIG_FILE() = /Users/jhenri201/gitrepo/vxrail-automation/switch/ansible.cfg
DEFAULT_FILTER_PLUGIN_PATH(/Users/jhenri201/gitrepo/vxrail-automation/switch/ansible.cfg) = ['/Users/jhenri201/gitrepo/vxrail-automation/switch/filter_plugins']
DEFAULT_GATHERING(/Users/jhenri201/gitrepo/vxrail-automation/switch/ansible.cfg) = smart
DEFAULT_LOG_PATH(/Users/jhenri201/gitrepo/vxrail-automation/switch/ansible.cfg) = /Users/jhenri201/gitrepo/vxrail-automation/switch/ansible.log
DEFAULT_ROLES_PATH(/Users/jhenri201/gitrepo/vxrail-automation/switch/ansible.cfg) = ['/Users/jhenri201/gitrepo/vxrail-automation/switch/roles']
DEFAULT_STDOUT_CALLBACK(/Users/jhenri201/gitrepo/vxrail-automation/switch/ansible.cfg) = skippy
DEFAULT_VAULT_PASSWORD_FILE(/Users/jhenri201/gitrepo/vxrail-automation/switch/ansible.cfg) = /Users/jhenri201/gitrepo/vxrail-automation/switch/.vault
DEPRECATION_WARNINGS(/Users/jhenri201/gitrepo/vxrail-automation/switch/ansible.cfg) = False
HOST_KEY_CHECKING(/Users/jhenri201/gitrepo/vxrail-automation/switch/ansible.cfg) = False
PERSISTENT_COMMAND_TIMEOUT(/Users/jhenri201/gitrepo/vxrail-automation/switch/ansible.cfg) = 600
PERSISTENT_CONNECT_TIMEOUT(/Users/jhenri201/gitrepo/vxrail-automation/switch/ansible.cfg) = 1200
OS / ENVIRONMENT
STEPS TO REPRODUCE

We use python’s venv module to create virtual environments for our ansible development and operations. I had been using a virtual environment built with python 3.8 and ansible 2.9.10 and then created a new virtual environment built with python 3.11 and ansible-community 8.1.0, ansible-core 2.15. The "show tech-support" command runs successfully using ansible v2.9.10 but fails under ansible-community 8.1.0/ansible-core 2.15.

ansible -i <inventory file> -m dellemc.os10.os10_command -a "commands='show tech-support'" '<switchname pattern>' -vvvv
EXPECTED RESULTS

The output of the "show tech-support" command to be returned and ansible reports ok

ACTUAL RESULTS

The command fails

PLAY RECAP **************************************************************************************************************************************************************************************************************************************************************
sw1102b-x.as.xcloud.comcast.com : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   
@prasadapr
Copy link
Collaborator

Hi @jay-henriques,
The fix required in both Ansible & OS10 side. Ansible fix is common for all the OS10 releases.
But in OS10 side, the fix needs to be merge as per the required releases and for 10.5.3, PR yet to merge state.
In the latest integration branch its already merged and tested, its working fine. Pls find the enclosed logs for the reference.

OS10# show version 
Dell SmartFabric OS10 Enterprise
Copyright (c) 1999-2023 by Dell Inc. All Rights Reserved.
OS Version: 10.5.6.0DEV
Build Version: 10.5.6.0DEV.7645
Build Time: 2023-11-02T10:25:32+0000
System Type: S4148F-ON
Architecture: x86_64
Up Time: 1 day 15:55:14
OS10#

Playbook for show tech-support

root@ubuntu22-vm-38-27:~/OS10-Collections# cat show_techsupport.yaml 
---
- name: Get os10 show tech support
  hosts: leaf
  gather_facts: no
  connection: network_cli
  collections:
   - dellemc.os10
  tasks:
   - name: os10 tech support
     os10_command:
       commands: show tech-support
root@ubuntu22-vm-38-27:~/OS10-Collections# 


Execution log:


root@ubuntu22-vm-38-27:~/OS10-Collections# ansible-playbook -i inventory.yaml show_techsupport.yaml -vvv 

<<< The execution log is very big, that's provided last few lines of execution logs for reference>>> 


            " ----------------------------------- show smartfabric nodes -------------------",
            "",
            "Service-Tag     Type      Status    Mode           Chassis-Service-Tag    Chassis-Slot    FabricId               ",
            "-----------------------------------------------------------------------------------------------------------------------------",
            "",
            " ----------------------------------- show smartfabric personality -------------------",
            "",
            "  ",
            "Personality     :None",
            "Role            :",
            "VLTi            :",
            "\u001b[J",
            " ----------------------------------- show smartfabric uplinks -------------------",
            "",
            "",
            " ----------------------------------- show smartfabric upgrade-status -------------------",
            "",
            "",
            "",
            "",
            " ----------------------------------- show smartfabric validation-errors -------------------"
        ]
    ]
}

PLAY RECAP *********************************************************************************************************************************************************************************
leaf                       : ok=1    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

root@ubuntu22-vm-38-27:~/OS10-Collections#

@prasadapr
Copy link
Collaborator

Hi @jay-henriques,
For 10.5.3 (10.5.3.9P1.188) release also the fixed was checked-in and its working fine.
Pls can we close this ticket.

@prasadapr
Copy link
Collaborator

Hi @jay-henriques,
The issue was fixed and checked-in and its working fine.
Pls can we close this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants