#snapmirror ipspace issue

1 messages · Page 1 of 1 (latest)

brave current
#

I'm trying to setup a snapmirror with the following module:

  • name: "{{ task_description }}"
    netapp.ontap.na_ontap_snapmirror:
    <<: *auth
    state : present
    hostname : "{{ cluster.destination.management_ip }}"
    source_endpoint :
    cluster : "{{ cluster.source.name }}"
    path : "{{ svm.source.name + ':' }}" #" + ':' + snapmirror.source.volume.name }}"
    # ipspace : "{{ ipspace.name }}"
    destination_endpoint :
    cluster : "{{ cluster.destination.name }}"
    path : "{{ svm.destination.name + ':' }}" #" + ':' + snapmirror.destination.volume.name }}"
    # ipspace : "{{ ipspace.name }}"
    create_destination :
    enabled : True
    identity_preservation : "{{ svmDR.identity_preservation | default(omit) }}"
    initialize : "{{ svmDR.initialize | default(omit) }}"
    policy : "{{ svmDR.policy | default(omit) }}"
    relationship_state : "{{ svmDR.relationship_state | default(omit) }}"
    schedule : "{{ svmDR.schedule | default(omit) }}"
    use_rest : always

After running I get the following error:
Reason: Cannot create the SVM peer permission because the cluster peer relationship with peer cluster "cluster1" was created using the IPspace "InterCluster", but the specified SVM "n1012TonnyDR" was created using the IPspace "Cloud". To create SVM peer permission, both IPspaces must be the same.\n'', ''code'': ''13303868''}.

What am I missing?

sharp holly
#

@brave current Checking from our end

sharp holly
brave current
#

source_endpoint :
cluster : "{{ cluster.source.name }}"
path : "{{ svm.source.name + ':' + '|interCluster' }}" #" + ':' + snapmirror.source.volume.name }}"
# ipspace : "{{ ipspace.name }}"

fatal: [localhost]: FAILED! => changed=false
msg: 'Error creating SnapMirror: calling: snapmirror/relationships: got {''message'': ''Volume name: The first character must be a letter or underscore.'', ''code'': ''917887'', ''target'': ''source.path''}.'

sharp holly
#

@brave current The below mentioned playbook works fine in my environment, whereas the cluster is in default ipspace and both vservers are in different ipspace,
- name: Create Snapmirror relationship (create destination volume)
na_ontap_snapmirror:
state: present
source_endpoint:
cluster: "{{ _source_cluster }}"
path: "{{ source_vserver + ':' }}"
destination_endpoint:
cluster: "{{ _destination_cluster }}"
path: "{{ destination_vserver_VOLDP + ':' }}"
create_destination:
enabled: true
identity_preservation : "full"
initialize : True
# policy : "sync"
relationship_state : "active"
use_rest : always
hostname: "{{ destination_hostname }}"
username: "{{ username }}"
password: "{{ password }}"
https: true
validate_certs: false

brave current
#

I found the problem on my site.
As soon as I add:
create_destination:
enabled: true
I get the error about the "InterCluster" and "IPspace Cloud"

What could be wrong here?

sharp holly
#

@brave current Can you try mentioning the ipspace names in playbook and run once or you can create volume in prior and set create destination as false.

brave current
#

Sorry for the long delay.
Changed create_destination:
enabled: false
It creates the snapmirror now, but no volumes.

sharp holly
#

@brave current Please adjust you configuration and try to have same ipspace for both cluster and SVM for the snapmirror to work.

minor flame
#

I believe this is a specific issue with snapmirror protect API.
Cluster peers can be between any IPSpace, it is not necessary for the SVMs being snapmirrored to be in the same IPspace as the cluster peer, despite what the error says. However I think this restriction was implemented for snapmirror protect.

#

For now I would probably do things piecemeal so you can avoid "create_destination", but this seems like an oversight on our part in implementing the API.

sharp holly
#

@minor flame As I discussed with my team, this looks like an API related issue. I don't think there's much we can do from our side. Please reach out to API team to check on this behaviour.