Closed mirkovancolen closed 1 year ago
We are looking in to this.
Not sure this will fix it, but we've made a lot of bug fixes between the version you are on 21.14.1, and the current release, version 22.4.1. Could you try upgrading 22.4.1 and rerunning your playbook and let us know if you get the same error.
@mirkovancolen To create cluster scoped IP interface in REST, vserver option should not be used. https://docs.ansible.com/ansible/latest/collections/netapp/ontap/na_ontap_interface_module.html#parameter-vserver
- name: Create cluster mgmt lif
na_ontap_interface:
state: present
interface_name: "cluster_mgmt"
address: "{{ cluster.mgmt_ip }}"
netmask: "{{ cluster.subnet }}"
service_policy: default-management
ipspace: default
admin_status: up
use_rest: always
home_node: "{{ nodes[0].name }}"
home_port: "{{ cluster.mgmt_port }}"
<<: *auth
Hi,
I have updated to the latest collection. And Have tried your suggestion. But it still fails.
{
"exception": "NoneType: None\n",
"msg": "Error creating interface cluster_mgmt: calling: network/ip/interfaces: got {'message': 'failed to set field \"svm\" to \"default\"', 'code': '2'}.",
"invocation": {
"module_args": {
"hostname": "172.16.56.2",
"username": "admin",
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"https": true,
"validate_certs": false,
"state": "present",
"interface_name": "cluster_mgmt",
"address": "172.16.56.1",
"netmask": "255.255.0.0",
"service_policy": "default-management",
"ipspace": "default",
"admin_status": "up",
"use_rest": "always",
"home_node": "joost-01",
"home_port": "e0c",
"ignore_zapi_options": [
"force_subnet_association"
],
"http_port": null,
"ontapi": null,
"feature_flags": null,
"cert_filepath": null,
"key_filepath": null,
"force_ontap_version": null,
"interface_type": null,
"broadcast_domain": null,
"current_node": null,
"current_port": null,
"role": null,
"is_ipv4_link_local": null,
"vserver": null,
"firewall_policy": null,
"failover_policy": null,
"failover_scope": null,
"failover_group": null,
"subnet_name": null,
"is_auto_revert": null,
"protocols": null,
"data_protocol": null,
"force_subnet_association": null,
"dns_domain_name": null,
"listen_for_dns_query": null,
"is_dns_update_enabled": null,
"from_name": null,
"probe_port": null,
"fail_if_subnet_conflicts": null
}
},
"_ansible_no_log": false,
"changed": false
}
I tried your arguments, but getting a different error message.
{'message': 'failed to set field \"ipspace.name\" to \"default\"', 'code': '2', 'target': 'ipspace.name'}
I fix this by setting correct ipspace name. Default instead default.
IPspace Vserver List Broadcast Domains
------------------- ----------------------------- ----------------------------
Cluster
Cluster Cluster
Default
ansibleSVM, ansibleSVM11, Default
can you try with ipspace: Default
?
Summary
When you try to create a lif using module na_ontap_interface on an admin svm (cluster mgmt or intercluster i.e.) with rest, it fails. if you say use_rest: never, it works.
Component Name
na_ontap_interface
Ansible Version
ONTAP Collection Version
ONTAP Version
Playbook
Steps to Reproduce
Expected Results
I expect so be able to create admin-svm lifs using rest, to cover day0 playbooks.
Actual Results