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

Error ndmp allowed na_ontap_svm create #178

Closed vcmirko closed 10 months ago

vcmirko commented 1 year ago

Summary

When I try to make a new svm in LOD RT11032278, it fails with:

Error in create: calling: svm/svms: got {''message'': ''Unexpected argument "ndmp".'', ''code'': ''262179'', ''target'': ''ndmp.allowed''}.'

The lab is a customer lab, built for demo's with ansible. However, creating an svm on the cluster at hand fails with this error

Component Name

na_ontap_svm

Ansible Version

$ ansible --version
ansible [core 2.14.5]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.11/site-packages/ansible
  ansible collection location = /usr/share/ansible/collections/ansible_collections:/etc/ansible/collections/ansible_collections
  executable location = /usr/bin/ansible
  python version = 3.11.6 (main, Oct  4 2023, 06:22:18) [GCC 12.2.1 20220924] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True

ONTAP Collection Version

$ ansible-galaxy collection list

# /usr/lib/python3.11/site-packages/ansible_collections
Collection                    Version
----------------------------- -------
amazon.aws                    5.4.0
ansible.netcommon             4.1.0
ansible.posix                 1.5.2
ansible.utils                 2.9.0
ansible.windows               1.13.0
arista.eos                    6.0.1
awx.awx                       21.14.0
azure.azcollection            1.15.0
check_point.mgmt              4.0.0
chocolatey.chocolatey         1.4.0
cisco.aci                     2.6.0
cisco.asa                     4.0.0
cisco.dnac                    6.7.1
cisco.intersight              1.0.27
cisco.ios                     4.5.0
cisco.iosxr                   4.1.0
cisco.ise                     2.5.12
cisco.meraki                  2.15.1
cisco.mso                     2.4.0
cisco.nso                     1.0.3
cisco.nxos                    4.3.0
cisco.ucs                     1.8.0
cloud.common                  2.1.3
cloudscale_ch.cloud           2.2.4
community.aws                 5.4.0
community.azure               2.0.0
community.ciscosmb            1.0.5
community.crypto              2.12.0
community.digitalocean        1.23.0
community.dns                 2.5.3
community.docker              3.4.3
community.fortios             1.0.0
community.general             6.6.0
community.google              1.0.0
community.grafana             1.5.4
community.hashi_vault         4.2.0
community.hrobot              1.8.0
community.libvirt             1.2.0
community.mongodb             1.5.2
community.mysql               3.6.0
community.network             5.0.0
community.okd                 2.3.0
community.postgresql          2.3.2
community.proxysql            1.5.1
community.rabbitmq            1.2.3
community.routeros            2.8.0
community.sap                 1.0.0
community.sap_libs            1.4.1
community.skydive             1.0.0
community.sops                1.6.1
community.vmware              3.5.0
community.windows             1.12.0
community.zabbix              1.9.3
containers.podman             1.10.1
cyberark.conjur               1.2.0
cyberark.pas                  1.0.17
dellemc.enterprise_sonic      2.0.0
dellemc.openmanage            6.3.0
dellemc.os10                  1.1.1
dellemc.os6                   1.0.7
dellemc.os9                   1.0.4
dellemc.powerflex             1.6.0
dellemc.unity                 1.6.0
f5networks.f5_modules         1.23.0
fortinet.fortimanager         2.1.7
fortinet.fortios              2.2.3
frr.frr                       2.0.2
gluster.gluster               1.0.2
google.cloud                  1.1.3
grafana.grafana               1.1.1
hetzner.hcloud                1.11.0
hpe.nimble                    1.1.4
ibm.qradar                    2.1.0
ibm.spectrum_virtualize       1.11.0
infinidat.infinibox           1.3.12
infoblox.nios_modules         1.4.1
inspur.ispim                  1.3.0
inspur.sm                     2.3.0
junipernetworks.junos         4.1.0
kubernetes.core               2.4.0
lowlydba.sqlserver            1.3.1
mellanox.onyx                 1.0.0
microsoft.ad                  1.0.0
netapp.aws                    21.7.0
netapp.azure                  21.10.0
netapp.cloudmanager           21.22.0
netapp.elementsw              21.7.0
netapp.ontap                  22.5.0
netapp.storagegrid            21.11.1
netapp.um_info                21.8.0
netapp_eseries.santricity     1.4.0
netbox.netbox                 3.12.0
ngine_io.cloudstack           2.3.0
ngine_io.exoscale             1.0.0
ngine_io.vultr                1.1.3
openstack.cloud               1.10.0
openvswitch.openvswitch       2.1.0
ovirt.ovirt                   2.4.1
purestorage.flasharray        1.17.2
purestorage.flashblade        1.11.0
purestorage.fusion            1.4.2
sensu.sensu_go                1.13.2
splunk.es                     2.1.0
t_systems_mms.icinga_director 1.32.2
theforeman.foreman            3.10.0
vmware.vmware_rest            2.3.1
vultr.cloud                   1.7.0
vyos.vyos                     4.0.2
wti.remote                    1.0.4

# /usr/share/ansible/collections/ansible_collections
Collection         Version
------------------ -------
amazon.aws         6.5.0
community.general  7.4.0
community.mysql    3.7.2
netapp.elementsw   21.7.0
netapp.ontap       22.7.0
netapp.storagegrid 21.11.1
netapp.um_info     21.8.1

ONTAP Version

NetApp Release Cloudwalker__9.9.1: Sun Jun 13 06:06:29 UTC 2021

Playbook

## Create svm
- name: "Creating svm {{ svm_name }}"      
  netapp.ontap.na_ontap_svm:
    state            : present
    name             : "{{ svm_name }}"
    allowed_protocols: "{{ svm_allowed_protocols }}"
    snapshot_policy  : "{{ svm_snapshot_policy }}"
    language         : "{{ svm_language    | default(omit) }}"
    comment          : "{{ svm_comment     | default(omit) }}"
    max_volumes      : "{{ svm_max_volumes | default(omit) }}"
    subtype          : "{{ svm_subtype     | default(omit) }}"
    ipspace          : "{{ ipspace_name    | default('Default') }}"
    ignore_rest_unsupported_options: true
    <<               : *auth
  register: create_vserver
  delegate_to: localhost

Steps to Reproduce

  ## Create svm
- name: "Creating svm {{ svm_name }}"      
  netapp.ontap.na_ontap_svm:
    state            : present
    name             : "{{ svm_name }}"
    allowed_protocols: "{{ svm_allowed_protocols }}"
    snapshot_policy  : "{{ svm_snapshot_policy }}"
    language         : "{{ svm_language    | default(omit) }}"
    comment          : "{{ svm_comment     | default(omit) }}"
    max_volumes      : "{{ svm_max_volumes | default(omit) }}"
    subtype          : "{{ svm_subtype     | default(omit) }}"
    ipspace          : "{{ ipspace_name    | default('Default') }}"
    ignore_rest_unsupported_options: true
    <<               : *auth
  register: create_vserver
  delegate_to: localhost

Expected Results

I expected my svm to be created

Actual Results

TASK [svm : Creating svm svm1_dr] **********************************************
task path: /app/dist/persistent/playbooks/roles/svm/tasks/create_dr.yml:12
ESTABLISH LOCAL CONNECTION FOR USER: root 2023-10-13 15:05:55
EXEC /bin/sh -c 'echo ~root && sleep 0'
EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1697209554.3495135-351-106576706716003 `" && echo ansible-tmp-1697209554.3495135-351-106576706716003="` echo /root/.ansible/tmp/ansible-tmp-1697209554.3495135-351-106576706716003 `" ) && sleep 0'
Using module file /usr/share/ansible/collections/ansible_collections/netapp/ontap/plugins/modules/na_ontap_svm.py
PUT /root/.ansible/tmp/ansible-local-333bfysmcve/tmp55kdkkrw TO /root/.ansible/tmp/ansible-tmp-1697209554.3495135-351-106576706716003/AnsiballZ_na_ontap_svm.py
EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1697209554.3495135-351-106576706716003/ /root/.ansible/tmp/ansible-tmp-1697209554.3495135-351-106576706716003/AnsiballZ_na_ontap_svm.py && sleep 0'
EXEC /bin/sh -c '/usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1697209554.3495135-351-106576706716003/AnsiballZ_na_ontap_svm.py && sleep 0'
EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1697209554.3495135-351-106576706716003/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => changed=false 
invocation:
module_args:
admin_state: null
aggr_list: null
allowed_protocols:
- cifs
cert_filepath: null
comment: null
feature_flags: null
force_ontap_version: null
from_name: null
hostname: 192.168.0.102
http_port: null
https: true
ignore_rest_unsupported_options: true
ipspace: Default
key_filepath: null
language: c.utf_8
max_volumes: null
name: svm1_dr
ontapi: null
password: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
root_volume: null
root_volume_aggregate: null
root_volume_security_style: null
services: null
snapshot_policy: default
state: present
subtype: null
use_rest: auto
username: admin
validate_certs: false
web: null
msg: 'Error in create: calling: svm/svms: got {''message'': ''Unexpected argument "ndmp".'', ''code'': ''262179'', ''target'': ''ndmp.allowed''}.'
carchi8py commented 1 year ago

This looks like a bug. ndmp.allowed is a 9.10+ feature so we should be giving a warning that about that before hitting create.

I have DEVOPS-6486 open for this.

joecaruso commented 1 year ago

It looks like this was fixed in 22.8.0 https://github.com/ansible-collections/netapp.ontap#2280

na_ontap_svm - fix REST version warning for ndmp under services.

carchi8py commented 10 months ago

Yep this was fixed in 22.8.0