ansible-collections / netapp.ontap

Ansible collection to support NetApp ONTAP configuration.
https://galaxy.ansible.com/netapp/ontap
GNU General Public License v3.0
57 stars 37 forks source link

na_ontap_service_processor_network not working using REST #222

Open fschuber-sva opened 2 months ago

fschuber-sva commented 2 months ago

Summary

When I try to change the SP using the ansible module na_ontap_service_processor_network with key use_rest: auto or always it always returns same error: Error in BMC Network configuration: enabled option for IPv4 interface is missing

Component Name

na_ontap_service_processor_network

Ansible Version

$ ansible --version
ansible [core 2.17.4]
  config file = /Volumes/Daten/git/configure-netapp-cluster/ansible.cfg
  configured module search path = ['/Users/fschuber/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/fschuber/.venv/lib/python3.12/site-packages/ansible
  ansible collection location = /Users/fschuber/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/fschuber/.venv/bin/ansible
  python version = 3.12.6 (main, Sep  6 2024, 19:03:47) [Clang 15.0.0 (clang-1500.3.9.4)] (/Users/fschuber/.venv/bin/python3.12)
  jinja version = 3.1.4
  libyaml = True

ONTAP Collection Version

ansible-galaxy collection list                 

# /Users/fschuber/.ansible/collections/ansible_collections
Collection                               Version
---------------------------------------- -------
ansible.netcommon                        5.1.1  
ansible.utils                            2.10.3 
cisco.aci                                2.1.0  
cisco.intersight                         1.0.24 
cisco.nxos                               4.3.0  
community.general                        5.5.0  
dellemc.powerstore                       1.9.0  
netapp.ontap                             22.12.0

# /Users/fschuber/.venv/lib/python3.12/site-packages/ansible_collections
Collection                               Version
---------------------------------------- -------
amazon.aws                               8.2.1  
ansible.netcommon                        6.1.3  
ansible.posix                            1.5.4  
ansible.utils                            4.1.0  
ansible.windows                          2.5.0  
arista.eos                               9.0.0  
awx.awx                                  24.6.1 
azure.azcollection                       2.7.0  
check_point.mgmt                         5.2.3  
chocolatey.chocolatey                    1.5.1  
cisco.aci                                2.10.1 
cisco.asa                                5.0.1  
cisco.dnac                               6.18.0 
cisco.intersight                         2.0.17 
cisco.ios                                8.0.0  
cisco.iosxr                              9.0.0  
cisco.ise                                2.9.3  
cisco.meraki                             2.18.1 
cisco.mso                                2.9.0  
cisco.nxos                               8.1.0  
cisco.ucs                                1.11.0 
cloud.common                             3.0.0  
cloudscale_ch.cloud                      2.4.0  
community.aws                            8.0.0  
community.ciscosmb                       1.0.9  
community.crypto                         2.22.0 
community.digitalocean                   1.27.0 
community.dns                            3.0.4  
community.docker                         3.12.1 
community.general                        9.4.0  
community.grafana                        1.9.1  
community.hashi_vault                    6.2.0  
community.hrobot                         2.0.1  
community.library_inventory_filtering_v1 1.0.1  
community.libvirt                        1.3.0  
community.mongodb                        1.7.6  
community.mysql                          3.10.3 
community.network                        5.0.3  
community.okd                            3.0.1  
community.postgresql                     3.5.0  
community.proxysql                       1.6.0  
community.rabbitmq                       1.3.0  
community.routeros                       2.19.0 
community.sap_libs                       1.4.2  
community.sops                           1.9.0  
community.vmware                         4.7.0  
community.windows                        2.3.0  
community.zabbix                         2.5.1  
containers.podman                        1.15.4 
cyberark.conjur                          1.3.0  
cyberark.pas                             1.0.27 
dellemc.enterprise_sonic                 2.5.0  
dellemc.openmanage                       9.6.0  
dellemc.powerflex                        2.5.0  
dellemc.unity                            2.0.0  
f5networks.f5_modules                    1.30.1 
fortinet.fortimanager                    2.7.0  
fortinet.fortios                         2.3.7  
frr.frr                                  2.0.2  
google.cloud                             1.4.1  
grafana.grafana                          5.5.0  
hetzner.hcloud                           3.1.1  
ibm.qradar                               3.0.0  
ibm.spectrum_virtualize                  2.0.0  
ibm.storage_virtualize                   2.4.1  
ieisystem.inmanage                       2.0.0  
infinidat.infinibox                      1.4.5  
infoblox.nios_modules                    1.6.1  
inspur.ispim                             2.2.3  
inspur.sm                                2.3.0  
junipernetworks.junos                    8.0.0  
kaytus.ksmanage                          1.2.2  
kubernetes.core                          3.2.0  
kubevirt.core                            1.5.0  
lowlydba.sqlserver                       2.3.3  
microsoft.ad                             1.7.1  
netapp.cloudmanager                      21.22.1
netapp.ontap                             22.12.0
netapp.storagegrid                       21.12.0
netapp_eseries.santricity                1.4.0  
netbox.netbox                            3.19.1 
ngine_io.cloudstack                      2.4.0  
ngine_io.exoscale                        1.1.0  
openstack.cloud                          2.2.0  
openvswitch.openvswitch                  2.1.1  
ovirt.ovirt                              3.2.0  
purestorage.flasharray                   1.31.1 
purestorage.flashblade                   1.18.0 
sensu.sensu_go                           1.14.0 
splunk.es                                3.0.0  
t_systems_mms.icinga_director            2.0.1  
telekom_mms.icinga_director              2.1.2  
theforeman.foreman                       4.2.0  
vmware.vmware                            1.5.0  
vmware.vmware_rest                       3.1.0  
vultr.cloud                              1.13.0 
vyos.vyos                                4.1.0  
wti.remote                               1.0.8

ONTAP Version

aff::> version
NetApp Release 9.11.1P15: Wed Apr 03 09:15:56 UTC 2024

Playbook

- name: Modify Service Processor Network
  netapp.ontap.na_ontap_service_processor_network:
    use_rest: always
    state: present
    node: "{{ item.node }}"
    prefix_length: "{{ item.netmask_length | default(omit) }}"
    ip_address: "{{ item.ip }}"
    gateway_ip_address: "{{ item.default_gw | default(omit) }}"
    address_type: "{{ item.address_type | default('ipv4') }}"
    netmask: "{{ item.netmask | default(omit) }}"
    is_enabled: "{{ item.enabled | default('true') }}"
    dhcp: "{{ item.dhcp | default('none') }}"  # allowed values: none, v4
  loop: "{{ netapp_serviceprocessor if netapp_serviceprocessor is iterable else [] }}"

Steps to Reproduce

netapp_serviceprocessor: [ { node: aff02-node01, ip: 10.100.101.64, netmask: 255.255.255.0, default_gw: 10.100.101.254 }, { node: aff02-node02, ip: 10.100.101.66, netmask: 255.255.255.0, default_gw: 10.100.101.254 } ]

Expected Results

SP gets IP address

Actual Results

TASK [01-base-install : Modify Service Processor Network] **********************************************************************************
task path: /Volumes/Daten/git/configure-netapp-cluster/roles/01-base-install/tasks/05_sp-setup.yml:2
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: fschuber
<127.0.0.1> EXEC /bin/sh -c 'echo ~fschuber && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /Users/fschuber/.ansible/tmp `"&& mkdir "` echo /Users/fschuber/.ansible/tmp/ansible-tmp-1726215571.366913-30034-176664046901404 `" && echo ansible-tmp-1726215571.366913-30034-176664046901404="` echo /Users/fschuber/.ansible/tmp/ansible-tmp-1726215571.366913-30034-176664046901404 `" ) && sleep 0'
Using module file /Users/fschuber/.ansible/collections/ansible_collections/netapp/ontap/plugins/modules/na_ontap_service_processor_network.py
<127.0.0.1> PUT /Users/fschuber/.ansible/tmp/ansible-local-2996682_ir48s/tmptsz1xg12 TO /Users/fschuber/.ansible/tmp/ansible-tmp-1726215571.366913-30034-176664046901404/AnsiballZ_na_ontap_service_processor_network.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /Users/fschuber/.ansible/tmp/ansible-tmp-1726215571.366913-30034-176664046901404/ /Users/fschuber/.ansible/tmp/ansible-tmp-1726215571.366913-30034-176664046901404/AnsiballZ_na_ontap_service_processor_network.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/Users/fschuber/.venv/bin/python3.12 /Users/fschuber/.ansible/tmp/ansible-tmp-1726215571.366913-30034-176664046901404/AnsiballZ_na_ontap_service_processor_network.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /Users/fschuber/.ansible/tmp/ansible-tmp-1726215571.366913-30034-176664046901404/ > /dev/null 2>&1 && sleep 0'
failed: [localhost] (item={'node': 'aff02-node01', 'ip': '10.100.101.64', 'netmask': '255.255.255.0', 'default_gw': '10.100.101.254'}) => changed=false 
  ansible_loop_var: item
  invocation:
    module_args:
      address_type: ipv4
      cert_filepath: null
      dhcp: null
      feature_flags: null
      force_ontap_version: null
      gateway_ip_address: 10.100.101.254
      hostname: 10.100.101.68
      http_port: null
      https: false
      ip_address: 10.100.101.64
      is_enabled: true
      key_filepath: null
      netmask: 255.255.255.0
      node: aff02-node01
      ontapi: null
      password: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
      prefix_length: null
      state: present
      use_rest: auto
      username: admin
      validate_certs: false
      wait_for_completion: false
  item:
    default_gw: 10.100.101.254
    ip: 10.100.101.64
    netmask: 255.255.255.0
    node: aff02-node01
  msg: 'Error modifying service processor network: calling: cluster/nodes/37d8b8b6-1111-11e9-a2cd-00a098f92838: got {''message'': ''Error in BMC Network configuration: enabled option for IPv4 interface is missing.'', ''code'': ''13631591''}.'
csahu9 commented 2 months ago

@fschuber-sva We've story 6662 open for this.