#Rename LIFs

1 messages · Page 1 of 1 (latest)

coral raven
#

Hi all,

Renaming cluster and node mangement lifs fails even though the cluster and node mangement lifs exists on the cluster. Below is the playbook and error!

If I add use_rest: never then it works fine..wanted to know how I can make the below code work without updating use_rest: never.

ontap: 9.8P11
netapp.ontap 22.3.0

  • name: "Rename cluster and node management interface(s): {{ node1 }}"
    netapp.ontap.na_ontap_interface:
    state: present
    from_name: "{{ item.lif }}"
    interface_name: "{{ item.lifname }}"
    vserver: "{{ item.vserver }}"
    <<: *nodelogin
    with_items: "{{ rename_lifs }}"
    tags:
    - rename_lifs

error:
failed: [localhost] (item={'lif': 'test-c01-nas-01_clus1', 'lifname': 'test-c01-nas-n01_clus1', 'vserver': 'Cluster'}) => changed=false
ansible_loop_var: item
item:
lif: test-c01-nas-01_clus1
lifname: test-c01-nas-n01_clus1
vserver: Cluster
msg: 'Error renaming interface test-c01-nas-n01_clus1: no interface with from_name test-c01-nas-01_clus1.'

vars:
rename_lifs:

  • { lif: "test-c01-nas-01_clus1", lifname: "test-c01-nas-n01_clus1", vserver: "Cluster" }

test-c01-nas::> net int show
(network interface show)
Logical Status Network Current Current Is
Vserver Interface Admin/Oper Address/Mask Node Port Home


Cluster
test-c01-nas-01_clus1 up/up 169.254.10.11/16 test-c01-nas-n01 e0c true

fervent arrow
#

Hi Sumanth...checking

fervent arrow
#

REST has limitation, non data vserver info cannot be fetched, here the vserver is cluster hence it is throwing error, ZAPI has to be used instead.
Same play works fine with other data vserver.

sullen scaffold
#

That is not correct. Node and cluster management LIFs can be renamed via REST. You just have to omit the parameter "vserver:"

tribal anvil
#

I think Dhivya meant we cannot use cluster name in vserver.

but to rename cluster scoped lif, skip vserver in REST as mentioned by @sullen scaffold

fervent arrow
coral raven
#

Ok I’ll try without vserver. Thank you all!