Closed jon-larsen closed 2 years ago
Hi @jon-larsen ! Can you provide the firmwares you're using? The one you're attempting to put onto the switch and the one already existing? Also could you provide the output of running the playbook in -vvvv
?
When checking the firmware, I noticed that the firmware for the 6300 switch is twice the size as of the 6200 and 8325, so I expanded the memory on the server I am running Ansible on, and it solved the problem!
I assume this also will fix the problem I have when uploading firmware to multiple switches at once (which is another problem I was thinking about reporting).
Hi, had a similar probleme today.
with -vvv got the following:
File \"/tmp/ansible_aoscx_upload_firmware_payload__mns8tid/ansible_aoscx_upload_firmware_payload.zip/ansible_collections/arubanetworks/aoscx/plugins/modules/aoscx_upload_firmware.py\", line 132, in main\nAttributeError: 'Device' object has no attribute 'device'\n",
went to aoscx_upload_firmware.py and commented line 131 (device = device.device()).
The problem seems to be present in 3 files:
aoscx_banner.py:
aoscx_boot_firmware.py:
aoscx_upload_firmware.py:
I'm looking into this - it may be a limitation of behavior with the requests library - @bozocorbalizer are you using the 6300 platform as well?
yes, I was testing both aoscx (6300M) and aos_switch (3810M) collections to see if we could use them in our new automation project.
Also ran into the "unterminated character set at position 0" and had to downgrade the ansible version.
python3 --version Python 3.8.10
ansible-galaxy --version ansible-galaxy 2.9.24
python3 -m pip show ansible Name: ansible Version: 2.9.24
python3 -m pip show pyaoscx Name: pyaoscx Version: 2.1.0
python3 -m pip list Package Version
ansible 2.9.24 attrs 19.3.0 Automat 0.8.0 bcrypt 3.1.7 beautifulsoup4 4.10.0 blinker 1.4 bs4 0.0.1 certifi 2019.11.28 chardet 3.0.4 Click 7.0 cloud-init 21.2 colorama 0.4.3 command-not-found 0.3 commonmark 0.9.1 configobj 5.0.6 constantly 15.1.0 cryptography 2.8 dbus-python 1.2.16 distro 1.4.0 distro-info 0.23ubuntu1 entrypoints 0.3 httplib2 0.14.0 hyperlink 19.0.0 idna 2.8 importlib-metadata 1.5.0 incremental 16.10.1 Jinja2 2.10.1 jsonpatch 1.22 jsonpointer 2.0 jsonschema 3.2.0 keyring 18.0.1 language-selector 0.1 launchpadlib 1.10.13 lazr.restfulclient 0.14.2 lazr.uri 1.0.3 MarkupSafe 1.1.0 more-itertools 4.2.0 netaddr 0.8.0 netifaces 0.10.4 oauthlib 3.1.0 packaging 20.3 paramiko 2.6.0 pexpect 4.6.0 pip 20.0.2 pyaoscx 2.1.0 pyasn1 0.4.2 pyasn1-modules 0.2.1 Pygments 2.10.0 PyGObject 3.36.0 PyHamcrest 1.9.0 PyJWT 1.7.1 pymacaroons 0.13.0 PyNaCl 1.3.0 pyOpenSSL 19.0.0 pyparsing 2.4.6 pyrsistent 0.15.5 pyserial 3.4 python-apt 2.0.0+ubuntu0.20.4.5 python-debian 0.1.36ubuntu1 PyYAML 5.3.1 requests 2.22.0 requests-unixsocket 0.2.0 resolvelib 0.5.4 rich 10.12.0 SecretStorage 2.3.1 service-identity 18.1.0 setuptools 45.2.0 simplejson 3.16.0 six 1.14.0 sos 4.1 soupsieve 2.2.1 ssh-import-id 5.10 systemd-python 234 Twisted 18.9.0 ubuntu-advantage-tools 27.2 ufw 0.36 unattended-upgrades 0.1 urllib3 1.25.8 wadllib 1.3.3 wheel 0.34.2 zipp 1.0.0 zope.interface 4.7.1
Our development team is looking into the "AttributeError: 'Device' object has no attribute 'device'" error and I'll update the issue as soon as we've pushed a resolution! Thank you for your patience!
I've uploaded a fix for this issue in the latest version of the collection - please update your collection by using the below command:
ansible-galaxy collection install arubanetworks.aoscx -f
I'm using Ansible to upload firmware. It works fine on a CX 6200F, but it fails on the 6300.