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

AnsiballZ_napalm_install_config.py Error #208

Open
barryconstantly opened this issue Jul 23, 2024 · 6 comments
Open

AnsiballZ_napalm_install_config.py Error #208

barryconstantly opened this issue Jul 23, 2024 · 6 comments

Comments

@barryconstantly
Copy link

Hello,

This is a Tower question (again). I get this error using napalm_install_config.py, but cannot find the Tower temp file:

Traceback (most recent call last):
File "/var/lib/awx/.ansible/tmp/ansible-local-3rxRMUx/ansible-tmp-1720792733.69-31-195727518534311/AnsiballZ_napalm_install_config.py", line 102, in
_ansiballz_main()

This is Tower 3.8.6 and ansible 2.9.27.

Any ideas what this error might be (I realize that is broad question..) but more practically how to stop Tower from deleting the temp file so I can inspect?

Thanks,
Barry

@ktbyers
Copy link
Collaborator

ktbyers commented Jul 23, 2024

@barryconstantly You need the full exception stack trace...not much we can do with just a line number and a single internal ansible reference (i.e. _ansiballz_main()).

@barryconstantly
Copy link
Author

But I cannot find the ansiballz file, I'm pretty sure Tower deletes it

@ktbyers
Copy link
Collaborator

ktbyers commented Jul 23, 2024

Yeah, you need to figure out how to get more information out of Tower regarding the failure (i.e. the full exception stack trace). There is also a way to prevent Ansible from deleting the file.

@barryconstantly
Copy link
Author

I followed instructions to prevent deleting files, this worked for many but unfortunately not Ansiballz.

@barryconstantly
Copy link
Author

I compared napalm playbook execution with a simple show version playbook (which only uses cisco ios module), and these errors were identical:

File "/usr/local/lib/python3.6/site-packages/selinux/init.py", line 23, in
import distro
File "/usr/local/lib/python3.6/site-packages/distro/init.py", line 1, in
from .distro import (
File "/usr/local/lib/python3.6/site-packages/distro/distro.py", line 40, in
from typing import (
File "/var/lib/awx/venv/ansible/lib/python2.7/site-packages/typing.py", line 782, in
AnyStr = TypeVar('AnyStr', bytes, unicode)
NameError: name 'unicode' is not defined

I think it has something to do with the host OS using Python 3.6 and Tower venv using Python 2.7.

I see some things when I Google that talk about the unicode variable and issues with Python 3 / 2.7, but still trying to determine the solution with Tower

@ktbyers
Copy link
Collaborator

ktbyers commented Jul 24, 2024

Python 2.7 is no longer supported by NAPALM (and many other libraries). Python 3.6 is also end-of-life and likely no longer supported.

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