aruba / aoscx-ansible-collection

Ansible collections for AOS-CX switches 
47 stars 23 forks source link

Unable to set autonegotiation 'on' and supported speeds for a disconnected interface #97

Open muralihcl opened 7 months ago

muralihcl commented 7 months ago

Hi Team,

When we run interface configuration according to the recorded documentation, we were able to configure physical interfaces. Because it is trial and error and we don't want to affect any connected system because of our trials, we have been working on a standalone switch which is not connected to any of the end devices. However, whatever method we attempt (using ansible collection and also using manual commands), we are not able to set auto negotiation up. Though the collection module accepts the value and passes it on, the outcome is not visible on the switch configuration. Same goes with other speeds. I just would like to know if setting of Auto negotiation to true needs the physical port to be connected or can it be done on any disconnected interface too.

Any hint would be really helpful.

With regards,

Muralidhara Kakkunje

alagoutte commented 7 months ago

Hi @muralihcl

What model/firmware ? and type of port ? (SFP, Copper ?)

Can you share your playbook ?

muralihcl commented 7 months ago

Hi @alagoutte ,

This is the hardware info of connector (SFP)

  "hw_intf_info": {
    "bridge": false,
    "card_intf_number": 10,
    "connector": "SFP_PLUS",
    "forced_speeds": "1000-full",
    "mac_addr": "94:f1:28:ef:d2:d6",
    "max_speed": "10000",
    "module_eeprom": "sfpp10",
    "pluggable": "true",
    "pm_max_power": 2500,
    "speeds": "1000,10000",
    "switch_intf_id": "10",
    "switch_unit": "0",
    "transceiver_bay_type": "SFP_1G_10G_CORE_wEDC",
    "tuning_type": "10GPHY_0002"
  }

This is the firmware version and the product is JL375A 8400 Base Chassis

Version      : XL.10.12.1000
Build Date   : 2023-08-10 17:54:37 UTC
Build ID     : ArubaOS-CX:XL.10.12.1000:dc56182bc285:202308101650
Build SHA    : dc56182bc28524aadef2db20ba4445118e963352
Hot Patches  :
Active Image : primary

Service OS Version : GT.01.12.0002
BIOS Version       : GT-01-0021

Here is the snippet of Ansible playbook we are using to just enable the interface with Auto negotiation on.

    - name: Configure the interface with the values provided
      arubanetworks.aoscx.aoscx_interface:
        name: "{{ interface_item['input_values']['interface_name'] }}"
        enabled: true
        configure_speed: "{{ interface_item['input_values']['configure_speed'] }}"
        description: "{{ interface_item['input_values']['interface_description'] }}"
        autoneg: "{{ interface_item['input_values']['interface_autoneg'] | default(true) }}"
        mtu: "{{ interface_item['input_values']['interface_mtu'] | default(omit) }}"
      register: reg_config_interface
      vars:
        ansible_host: "{{ interface_item['input_values']['aruba_ip_address'] }}"
        ansible_user: "{{ aruba_username }}"
        ansible_password: "{{ aruba_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
        ansible_aoscx_rest_version: 10.09

Let me know if this helps clarify.

With regards,

Muralidhara Kakkunje

tchiapuziowong commented 7 months ago

Can you share what the resulting configuration looks like in the CLI of the switch? @muralihcl Also can you provide some same values you would use for the variables in your playbook? Example data you're sending?

muralihcl commented 7 months ago

Hi @tchiapuziowong ,

In below screenshot, I am trying to manually set auto-negotiation on, the configuration was even accepted.

image

But, when I look at the running config, I don't see them at all.

image

Same thing is observed, even if I apply these settings via Ansible playbook.

---
aruba_switch_map:
  - aruba_ip_address: X.Y.Z.A
    interface_name: "1/2/10"
    configure_speed: false
    interface_description: "Interface 1_2_10"
    interface_duplex: "full"
    interface_autoneg: true
    interface_speeds:
      - 1000
aruba_username: username
aruba_password: password

We loop through the aruba_switch_map to get the details for individual switches. We have now deployed the logic to segregate variables according to the exclusivity.

With regards,

Muralidhara Kakkunje