#create_destination option for na_ontap_snapmirror

1 messages · Page 1 of 1 (latest)

willow wasp
#

using the na_ontap_snapmirror module to create snapmirrors. wanting to use the create_destination to create DP volume automatically but it errors out if i add the option. if i remove it then it gives error no volume.

- name: Create SnapMirror relationship
  na_ontap_snapmirror:
    source_endpoint:
      path: "{{ item.vserver + ':' + item.volume }}"
      cluster: "{{ clustername }}"
    destination_endpoint:
      path: "{{ item.dest_vserver + ':' + item.volume + '_dest' }}"
      cluster: "{{ destclustername }}"
    policy: "{{ item.protection_policy }}"
    initialize: true
    create_destination:
      enabled: true
      storage_service:
        enabled:  false
        enforce_performance: false
    hostname: "{{ destclusterip }}"
    username: "{{ username }}"
    password: "{{ password }}"
    https: true
    validate_certs: false
  with_items: "{{ mirror_vols }}"
#

using ONTAP 9.10.1 on both clusters. also tried the playbook that comes straight out of system manager, same error.

wide cipher
#

whats the netapp.ontap collection version?

knotty scarab
#

Try to use in hostname 'destclustername' instead of 'destclusterip'

willow wasp
willow wasp
#

it only gives the error when the destination volume doesnt exist and it tries to create. if we create the volume it will create the mirror no problem

wide cipher
#

error indicates
AttributeError: module 'ansible_collections.netapp.ontap.plugins.module_utils.rest_generic' has no attribute 'check_for_0_or_more_records'\n"

not sure ansible looking at old collection path.

are there more than one ontap collection versions installed?

willow wasp
#

actually yes there is. this would explain some other issues i see regarding versions, just thought the modules were buggy...

#

/home/nigel/.local/lib/python3.8/site-packages/ansible_collections

Collection Version


netapp.ontap 21.24.1

/home/nigel/.ansible/collections/ansible_collections

Collection Version


netapp.ontap 22.4.0

#

that second location was created when i run 'ansible-galaxy collection install --upgrade netapp.ontap'

#

how do i upgrade the other location or tell ansible to use the new location?

#

ansible --version
ansible [core 2.13.8]
config file = None
configured module search path = ['/home/nigel/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/nigel/.local/lib/python3.8/site-packages/ansible
ansible collection location = /home/nigel/.ansible/collections:/usr/share/ansible/collections
executable location = /home/nigel/.local/bin/ansible
python version = 3.8.10 (default, Nov 26 2021, 20:14:08) [GCC 9.3.0]
jinja version = 3.1.2
libyaml = True

wide cipher
#

22.4.0 has issues in snapmirror create😞 .
but the fix will be out soon.

so try 22.3.0 till 22.4.1 comes out.
ansible-galaxy collection install netapp.ontap:22.3.0 -f

if this not adding collection where ansible checks, there is -p flag to install in specific location
ansible-galaxy collection install netapp.ontap:22.3.0 -p /home/nigel/.local/lib/python3.8/site-packages/ansible_collections -f

willow wasp
#

thanks, ill test it out.

willow wasp
#

still getting the same problem. guess ill just manually create them for now. thanks anyway

wide cipher
#

whats the error?