-
Notifications
You must be signed in to change notification settings - Fork 23
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
aoscx_upload_firmware 401 Authorization Required Aruba CX 6200f / 6300M #78
Comments
Are you upgrading the 6200 from 10_10_1010 to 10_10_1040? Can you provide the full error? Does this error occur immediately or after some time? Can you verify if you've installed all the required libraries outlined here? |
Error: |
@mrfischl can you move the firmware to a different location other than the /root/ folder? perhaps the home or Desktop of the user that's running the playbook? I'll see if I can replicate this in my environment. |
@tchiapuziowong In our productive system is the location /home/user/ansible/firmware/ |
Can you provide the versions you have installed for the following Python libraries?
|
Hi @mrfischl |
@tchiapuziowong |
@JSTBotanic Hi, check out "Getting Started with Ansible and AOS-CX" there is a example. You just need to change the module. |
Hi @tchiapuziowong @JSTBotanic @mrfischl, Switch Info:
Collection version:
I also tried to gather different facts which doesn't seem to work. - name: Gather facts
arubanetworks.aoscx.aoscx_facts:
gather_network_resources:
- vlans
- interfaces
gather_subset:
- config
vars:
ansible_command_timeout: 60
- name: Gather facts
arubanetworks.aoscx.aoscx_facts:
vars:
ansible_command_timeout: 60 If i don't specify The error seems to originate somewhere when calling aoscx-ansible-collection/plugins/modules/aoscx_facts.py Lines 250 to 252 in de5c759
To test that i put some debug output before and after that call. The output after that is never reached. |
@tchiapuziowong There you go:
I think we found the issue on our side. The problem seems to be that we have a dual stack environment (IPv4/IPv6) and our firewall blocks IPv6 to the switch per default as it is in another environment as the other switches i've tested previously with. If i enter the IPv4 of the switch in the Ansible inventory directly it works without any issues. |
@smirlach are defining two addresses for the |
@tchiapuziowong i have defined the |
@tchiapuziowong |
@tchiapuziowong |
@mrfischl the inventory/playbook would be the same for any model of switch - this may be an issue seen only when using a non-management VRF to connect to the switch |
@tchiapuziowong |
@mrfischl reopening - our internal team is still investigating why it's failing non-mgmt, I'll update this issue once we have more information regarding the behavior |
i am also having this issue with a 6100 series switch. there's no option to use a mgmt vrf in my instance so i am forced to use the default vrf |
Hi @jonathanbaird - we're evaluating the fix for an upcoming minor release and will update the issue once it's implemented, thank you for your continued patience during this time. As a workaround you could utilize the SSH module aoscx_command to upload a firmware using a server - for a full example see our workflows repository here: https://github.com/aruba/aoscx-ansible-workflows/blob/main/copy_config_using_cli_prompt.yml |
@tchiapuziowong Any updates? |
We've just published a fix for this issue, please install the latest version of the collection and verify if you no longer see this issue:
|
Hey, I had the same error message but I was uploading the firmware through http instead of using local resources. |
@2relativ if you install the latest version of the collection are you still running into the same issue without explicitly defining |
Yes. Definitely. I tried first a workaround until I saw this option in the debug log. The interesting part is, that the switch itself wouldn't let me in over webinterface also. So, I would definitely set the wait_firmware_upload as default. But please be careful since my upload is over http from a different server. So the ansible server has to explicitly request if the server is ready instead of maybe monitoring the firmware upload from himself. |
i have already open a PR #98 for add missing wait_firmware_upload, I has the same issue when use http/https |
Hey Guys,
I've been using Ansible for a few weeks and have written a playbook for updating Aruba CX switches. Unfortunately, I have problems with the firmware upload on the CX6200F and 6300M.
The Problem:
fatal: [aoscx_1]: FAILED! => {"changed": false, "msg": "'GENERIC OPERATION ERROR: 401 Authorization Required: Code: 401'"}
I forgot the "-vvv" but i can post it later if required.
My test-setup:
Versions:
Ansible: ansible [core 2.14.6]
Python3: 3.10.6
Aoscx: arubanetworks.aoscx 4.2.1
Ubuntu: 22.04.2 LTS
Aruba CX 6200f: ML.10.10.1040
Inventory
all:
hosts:
aoscx_1:
ansible_host: 192.168.178.253
ansible_user:
ansible_password:
ansible_network_os: arubanetworks.aoscx.aoscx
ansible_connection: arubanetworks.aoscx.aoscx
ansible_aoscx_validate_certs: False
ansible_aoscx_use_proxy: False
ansible_acx_no_proxy: True
Playbook
collections:
gather_facts: False
tasks:
aoscx_upload_firmware:
partition_name: 'primary'
firmware_file_path: '/root/ansible/firmware/ArubaOS-CX_6200_10_10_1010.swi'
Switch:
Current configuration:
!
!Version ArubaOS-CX ML.10.10.1040
!export-password: default
user admin group administrators password ciphertext
ntp server pool.ntp.org minpoll 4 maxpoll 4 iburst
ntp enable
!
ssh server vrf default
ssh server vrf mgmt
vsf member 1
type jl725a
vlan 1
spanning-tree
interface mgmt
no shutdown
ip dhcp
interface 1/1/1-1/1/28
no shutdown
no routing
vlan access 1
interface vlan 1
ip address 192.168.178.253/24
ip dhcp
! ip dhcp is ignored when static ip is configured
!
!
!
!
!
https-server vrf default
https-server vrf mgmt
https-server rest access-mode read-write \configured but not displayed in "show run"?!
Other tests:
aoscx_vlan - works fine
Aruba CX 6100 - Firmware upload no problems
Wireshark - in the pcap i can see that the file transfer is running
Hope you can help me.
Greetings Lukas
The text was updated successfully, but these errors were encountered: