Open cultcom opened 2 years ago
The "lxml exception" you are getting only on S5232F Switch or even on other switches also facing the same issue? Possible pls can you share your inventory file.
possible can you share ansible.cfg file : cat /etc/ansible/ansible.cfg
ansible is installed locally with "pip" so I have no /etc/ansible/ansible.cfg and everything is default.
I get the error on the other S5000 series switches as well. All I found so far is an issue with Py3 but Py2 is no longer supported by ansible.
I think the problem is with some environmental issue or may be configuration.
Any idea then where to start debugging?
I tried to reproduce the issue on same platform (S5232F-ON & S5248F-ON) with same Image and same version of ansible, python and Collection. Its working fine for me, without any Issues.
Find the enclosed details for the same:
show version Dell EMC Networking OS10 Enterprise Copyright (c) 1999-2021 by Dell Inc. All Rights Reserved. OS Version: 10.5.2.7 Build Version: 10.5.2.7.374 Build Time: 2021-07-28T04:48:16+0000 System Type: S5232F-ON Architecture: x86_64 Up Time: 00:10:17
hosts: datacenter gather_facts: False connection: network_cli
tasks:
dellemc.os10.os10_facts: gather_subset: all register: facts
debug: msg: "{{ facts }}"
ansible --version ansible [core 2.12.0] config file = None configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections executable location = /usr/local/bin/ansible python version = 3.8.10 (default, Nov 26 2021, 20:14:08) [GCC 9.3.0] jinja version = 2.10.1 libyaml = True
python3 --version Python 3.8.10
ansible-galaxy collection list dellemc.os10 Collection Version
dellemc.os10 1.1.1
provided few lines of ansible execution log
ansible-playbook -i inventory.yaml os10_ansible_facts_109.yaml
PLAY [datacenter] ***** [WARNING]: Collection ansible.netcommon does not support Ansible version 2.12.0
TASK [dellemc.os10.os10_facts] **** ok: [spine]
TASK [debug] ** ok: [spine] => { "msg": { "ansible_facts": {
},
"ansible_net_servicetag": "1RLD9Z2",
"ansible_net_version": "10.5.2.7"
},
"changed": false,
"failed": false
}
}
PLAY RECAP **** spine : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
possible can we have live session to debug.
nice idea but my time is running out today. I am back in office the January 5th. You may contact me over IRC (eJunky), I am currently hanging in #ansible-network channel.
Starting all over again I managed to get things running with hard coded passwords. So my problem starts using "ssh_type=libssh" which I really want to use to utilize my ".ssh/config" and the corresponding private keys.
Any ideas why this is happening?
@prasadapr and @cultcom I just encountered this issue with the collection. I hit it because ansible.netcommon
>= 3.0.0 has switched to ssh_type=libssh
by default (changelog for reference).
If you are using ansible.netcommon
>= 3.0.0 then you need to configure ssh_type
to use paramiko
. I'd like to be able to use libssh
in the future as it is becoming the standard and with it we get the potential for more security guarantees (blog for reference).
@prasadapr and @cultcom I just encountered this issue with the collection. I hit it because
ansible.netcommon
>= 3.0.0 has switched tossh_type=libssh
by default (changelog for reference).If you are using
ansible.netcommon
>= 3.0.0 then you need to configuressh_type
to useparamiko
. I'd like to be able to uselibssh
in the future as it is becoming the standard and with it we get the potential for more security guarantees (blog for reference).
I have same problem and I changed the ssh connection to use paramiko at the hostvar level by using ansible_network_cli_ssh_type: paramiko , so other connections can use libssh that is better for reason mentioned.
hostname: DSED101 ansible_ssh_user: mrmime ansible_network_os: dellemc.os10.os10 ansible_network_cli_ssh_type: paramiko
@prasadapr This needs attention now that ansible.netcommon
in this collection v1.2.4 defaults to ansible-pylibssh
We have also ran into this issue making us force the use of paramiko
over ansible-pylibssh
.
Related: https://github.com/ansible-collections/dellemc.os10/issues/147
ansible==8.1.0
ansible-core==2.15.8
ansible-pylibssh==1.1.0
bcrypt==4.1.2
certifi==2023.11.17
cffi==1.16.0
charset-normalizer==3.3.2
cryptography==41.0.7
dnspython==2.4.2
future==0.18.3
idna==3.6
Jinja2==3.1.3
jmespath==1.0.1
lxml==5.1.0
MarkupSafe==2.1.3
netaddr==0.10.1
packaging==23.2
paramiko==3.4.0
pathspec==0.12.1
pycparser==2.21
PyNaCl==1.5.0
pynetbox==7.0.1
pytz==2023.3.post1
PyYAML==6.0.1
requests==2.31.0
resolvelib==1.0.1
six==1.16.0
textfsm==1.1.3
urllib3==2.1.0
xmltodict==0.13.0
yamllint==1.33.0
Hi @lucastobey, @timway , @cultcom and @Eddgar0, Thanks for all your observations and comments.
Will check and update on this.
SUMMARY
I try to run os10_facts against a S5232F Switch and always get a lxml exception:
ISSUE TYPE
COMPONENT NAME
os10_facts
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
I expect to get an dictionary with facts about the switch.
ACTUAL RESULTS
I get the exception as quoted above.