#na_ontap_snapmirror with policy type sync

1 messages · Page 1 of 1 (latest)

turbid sparrow
#

When I execute a task using the module na_ontap_snapmirror and the SnapMirror type is set to Sync, I encounter this error.

"msg": "Error patching SnapMirror: {'state': 'snapmirrored'}: calling: snapmirror/relationships/242f0875-b0a2-11ef-8f51-d039ea2744dd: got {'message': 'This is a Synchronous SnapMirror relationship, snapmirrored is an invalid state for Synchronous SnapMirror relationships. Transition to in_sync state instead to achieve continouous data-protection', 'code': '13303829'}."

Any suggestions on how to prevent the module from searching for the SnapMirror state "snapmirrored" and instead search for the state "in_sync"?

netapp.ontap version 22.12.0

dark swan
#

Hello everyone,
We are using netapp.ontap version 22.14.0 and currently have the same problem:

"msg": "Error patching SnapMirror: {'state': 'snapmirrored'}: calling: snapmirror/relationships/d1afdafc-00bb-11f0-bf74-d039ea18313c: got {'message': 'This is a Synchronous SnapMirror relationship, snapmirrored is an invalid state for Synchronous SnapMirror relationships. Transition to in_sync state instead to achieve continouous data-protection', 'code': '13303829'}."}
fierce spoke
dark swan
#

@fierce spoke
Unfortunately, I don't understand the solution.
We create the target volume as follows

    - name: DR SVM - Volumes anlegen
      netapp.ontap.na_ontap_volume:
        state: present
        name: "{{ item.name }}"
        vserver: "{{ var_role_drVserverName }}"
        aggregate_name: "{{ (secondaryAggregates |sort(attribute='percentUsed'))[0]['name'] }}"
        size: "{{ ((item.size | int / (100 - var_role_percentSnapshotSpace) * 100)) | int }}"
        size_unit: "gb"
        atime_update: false
        space_guarantee: none
        tiering_policy: none
        policy: "{{ var_role_exportPolicyName }}"
        percent_snapshot_space: "{{ var_role_percentSnapshotSpace }}"
        type: DP
        snapdir_access: true
        is_infinite: False
        wait_for_completion: True
        https: true
        use_rest: always
        validate_certs: false
        hostname: "{{ var_role_secondaryCluster }}"
        username: "{{ var_role_username }}"
        password: "{{ var_role_password }}"
      with_items: "{{ var_role_volumes }}"
#

And then create the SNapmirror sync:

    - name: DR SVM - Snapmirror Beziehung anlegen
      netapp.ontap.na_ontap_snapmirror:
        state: present
        source_endpoint:
          cluster: "{{ var_role_primaryCluster.split('.')[0] }}"
          path: "{{ var_role_primaryVserverName + ':' + item.name }}"
        destination_endpoint:
          cluster: "{{ var_role_secondaryCluster.split('.')[0] }}"
          path: "{{ var_role_drVserverName + ':' + item.name }}"
        policy: "Sync"
        initialize: False
        https: true
        use_rest: always
        validate_certs: false
        hostname: "{{ var_role_secondaryCluster }}"
        username: "{{ var_role_username }}"
        password: "{{ var_role_password }}"
      with_items: "{{ var_role_volumes }}"
#

And this leads to the following error:

"msg": "Error patching SnapMirror: {'state': 'snapmirrored'}: calling: snapmirror/relationships/d1afdafc-00bb-11f0-bf74-d039ea18313c: got {'message': 'This is a Synchronous SnapMirror relationship, snapmirrored is an invalid state for Synchronous SnapMirror relationships. Transition to in_sync state instead to achieve continouous data-protection', 'code': '13303829'}."}
fierce spoke
#

@dark swan Please try creating policy and then try snapmirror sync once

copper hamlet
#

I am facing the same issue . Running latest version of NetApp ONTAP Module.

TASK [../roles/netapp_storage : Create SnapMirror relationships] ***************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NoneType: None
failed: [10.129.232.110] (item={'source_cluster': 'a300_R3', 'source_svm': 'svm_nfs', 'source_volume': 'vol_nsyncTst_01', 'dest_cluster': 'AFF300CL02', 'dest_svm': 'dominicbwbc02dr', 'dest_volume': 'vol_nsyncTst_01_dr', 'policy': 'Sync'}) => {"ansible_loop_var": "item", "changed": false, "item": {"dest_cluster": "AFF300CL02", "dest_svm": "dominicbwbc02dr", "dest_volume": "vol_nsyncTst_01_dr", "policy": "Sync", "source_cluster": "a300_R3", "source_svm": "svm_nfs", "source_volume": "vol_nsyncTst_01"}, "msg": "Error patching SnapMirror: {'state': 'snapmirrored'}: calling: snapmirror/relationships/bfca20db-1aae-11f0-8f0f-00a098bc18ad: got {'message': 'This is a Synchronous SnapMirror relationship, snapmirrored is an invalid state for Synchronous SnapMirror relationships. Transition to in_sync state instead to achieve continouous data-protection', 'code': '13303829'}."}

fierce spoke
#

@copper hamlet Please make sure to have a policy inplace. we will recheck the issue and get back to you.