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 36 forks source link

Creation of cluster_mgmt fails #98

Closed flohzirkus666 closed 2 years ago

flohzirkus666 commented 2 years ago

Summary

Hi guys,

I was recently working with a customer on some day-0 tasks. Most of the stuff is working as expected, however we are currently facing some strange behaviour when creating a cluster management interface.

Component Name

na_ontap_interface

Ansible Version

$ ansible --version

ONTAP Collection Version

$ ansible-galaxy collection list

ONTAP Version

9.10.1

Playbook

- name: Create cluster management interface
  netapp.ontap.na_ontap_interface:
    state: present
    interface_name: cluster_mgmt
    home_port: e0M
    home_node: cluster1-01
    service_policy: default-management
    admin_status: up
    is_auto_revert: true
    vserver: cluster1
    hostname: "{{ netapp_hostname }}"
    username: "{{ netapp_username }}"
    password: "{{ netapp_password }}"

Steps to Reproduce

# Step 1: create cluster
- name: Create cluster
  netapp.ontap.na_ontap_cluster:
    state: present
    cluster_name: cluster1
    time_out: 0
    hostname: "{{ netapp_hostname }}"
    username: "{{ netapp_username }}"
    password: "{{ netapp_password }}"
# Step 2: join second node
- name: Add node to cluster (Join cluster)
  netapp.ontap.na_ontap_cluster:
    state: present
    cluster_ip_address: 10.10.10.10
    hostname: "{{ netapp_hostname }}"
    username: "{{ netapp_username }}"
    password: "{{ netapp_password }}"
# Step3: Do some interface magic - at this point the setup process fails

# Step 4 would be completing setup by using the cluster_setup role

Expected Results

Having a working cluster interface on admin SVM

Actual Results

NoneType: None
fatal: [localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "address": "192.168.10.123",
            "admin_status": null,
            "cert_filepath": null,
            "current_node": null,
            "current_port": null,
            "data_protocol": null,
            "dns_domain_name": null,
            "failover_group": null,
            "failover_policy": null,
            "failover_scope": null,
            "feature_flags": {},
            "firewall_policy": null,
            "force_subnet_association": null,
            "from_name": null,
            "home_node": "ncchhzrh91-01",
            "home_port": "e0M",
            "hostname": "192.168.10.100",
            "http_port": null,
            "https": false,
            "ignore_zapi_options": [
                "force_subnet_association"
            ],
            "interface_name": "cluster_mgmt",
            "interface_type": null,
            "ipspace": "default",
            "is_auto_revert": true,
            "is_dns_update_enabled": null,
            "is_ipv4_link_local": null,
            "key_filepath": null,
            "listen_for_dns_query": null,
            "netmask": "255.255.255.0",
            "ontapi": null,
            "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "protocols": null,
            "role": null,
            "service_policy": "default-management",
            "state": "present",
            "subnet_name": null,
            "use_rest": "auto",
            "username": "admin",
            "validate_certs": false,
            "vserver": "cluster1"
        }
    },
    "msg": "Error creating interface cluster_mgmt: calling: network/ip/interfaces: got {'message': 'The specified svm.name \"cluster1\", is invalid.', 'code': '1967146', 'target': 'svm.name'}."
lonico commented 2 years ago

You need to leave out the vserver parameter when using REST. REST only wants to see data vservers.

These questions are better addressed on Discord: https://discord.gg/netapp

flohzirkus666 commented 2 years ago

Hi Ionico

Thanks you for your reply. I will check with the customer if this will do the trick. If this will resolve our issue, I will close this ticket.

flohzirkus666 commented 2 years ago

Unfortunately this doesn't resolved this issue. I will push this further in discord. Anyway, thanks for your help!