#"Error patching SnapMirror" when creating/breaking snapmirrors

1 messages · Page 1 of 1 (latest)

timid compass
#

I'm trying to write some playbooks for creating and breaking snapmirror relationships, for data migration purposes. I'm having some trouble with a timeout of some type with these operations.

Creating and initializing snapmirrors does succeed, although it seems to have a time out. It will be doing the initial transfer after the playbook has ended.
Creating snapmirrors:
"msg": "Error patching SnapMirror: {'state': 'snapmirrored'}: calling: snapmirror/relationships/21608b6d-412e-11ee-b1a9-d039ea444514: got HTTPSConnectionPool(host='<redacted>', port=443): Read timed out. (read timeout=60)."

Breaking snapmirrors will result in the snapmirror quiescing, but not breaking and or the volume becoming RW as expected.
Breaking snapmirrors:
"msg": "Error patching SnapMirror: {'state': 'paused'}: calling: snapmirror/relationships/0dc49b40-4114-11ee-a830-d039ea4aed6c: got HTTPSConnectionPool(host='<redacted>', port=443): Read timed out. (read timeout=60)."

I'll include the code being used in a comment. I'm still fairly new to ansible.

#

source_volumes is a list defined earlier in the playbook

- name: create/update snapmirror relationships na_ontap_snapmirror: state: present source_endpoint: path: "{{ source_vserver+ ':' + item }}" destination_endpoint: path: "{{ dest_vserver+ ':' + item +'_mirror' }}" schedule: hourly initialize: true hostname: "{{ dest_hostname }}" username: "{{ username }}" password: "{{ password }}" https: "{{ https }}" validate_certs: "{{ validate_certs }}" transferring_time_out: 60 #without this, if the relationship exists already, it waits 300 seconds checking if the snapmirror transfer is completed or not. Most won't complete in that time. loop: "{{ source_volumes }}" ignore_errors: true #required so it doesn't error out from the timeout error

#

- name: break snapmirror na_ontap_snapmirror: state: present relationship_state: broken source_endpoint: path: "{{ source_vserver+ ':' + item }}" destination_endpoint: path: "{{ dest_vserver + ':' + item +'_mirror'}}" peer_options: hostname: "{{ source_hostname }}" username: "{{ username }}" password: "{{ password }}" https: "{{ https }}" validate_certs: "{{ validate_certs }}" username: "{{ username }}" password: "{{ password }}" hostname: "{{ dest_hostname }}" https: true validate_certs: true loop: "{{ source_volumes }}"

timid compass
#

More weird results... if I run the Break one again, it does go from Quiesced to Broken Off. But then my steps to delete the snapmirror has the same timeout.

It is like it is waiting for some sort of confirmation response that it isn't getting, even though the commands are succeeding.

sharp heart
#

Hi, yes, it waits for the completion of operation to be completed.

timid compass
#

Any way to find out what is delaying it, or increase that timeout? It doesn't appear to be related to the "transferring_time_out" parameter, which I have tried adjusting.

#

<127.0.0.1> EXEC /bin/sh -c 'echo ~username && sleep 0' <127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p " echo /Users/username/.ansible/tmp "&& mkdir " echo /Users/username/.ansible/tmp/ansible-tmp-1692815192.997396-9784-78903616649447 " && echo ansible-tmp-1692815192.997396-9784-78903616649447=" echo /Users/username/.ansible/tmp/ansible-tmp-1692815192.997396-9784-78903616649447 " ) && sleep 0' Using module file /Users/username/.ansible/collections/ansible_collections/netapp/ontap/plugins/modules/na_ontap_snapmirror.py <127.0.0.1> PUT /Users/username/.ansible/tmp/ansible-local-9629msn9eg15/tmparkkj2oh TO /Users/username/.ansible/tmp/ansible-tmp-1692815192.997396-9784-78903616649447/AnsiballZ_na_ontap_snapmirror.py <127.0.0.1> EXEC /bin/sh -c 'chmod u+x /Users/username/.ansible/tmp/ansible-tmp-1692815192.997396-9784-78903616649447/ /Users/username/.ansible/tmp/ansible-tmp-1692815192.997396-9784-78903616649447/AnsiballZ_na_ontap_snapmirror.py && sleep 0' <127.0.0.1> EXEC /bin/sh -c '/opt/homebrew/Cellar/ansible/8.2.0_2/libexec/bin/python /Users/username/.ansible/tmp/ansible-tmp-1692815192.997396-9784-78903616649447/AnsiballZ_na_ontap_snapmirror.py && sleep 0' <127.0.0.1> EXEC /bin/sh -c 'rm -f -r /Users/username/.ansible/tmp/ansible-tmp-1692815192.997396-9784-78903616649447/ > /dev/null 2>&1 && sleep 0' The full traceback is: NoneType: None failed: [localhost] (item=kube_pvc_6315d993_aef7_42fc_b955_b9cc288732eb) => { "ansible_loop_var": "item", "changed": false, "invocation": { "module_args": { "cert_filepath": null, "clean_up_failure": false, "connection_type": "ontap_ontap", "create_destination": null, "destination_cluster": null, "destination_endpoint": { "cluster": null, "consistency_group_volumes": null, "ipspace": null, "path": "us-stl-appdev-prd1:kube_pvc_6315d993_aef7_42fc_b955_b9cc288732eb_mirror", "svm": null }, "destination_path": null, "destination_volume": null, "destination_vserver": null, "feature_flags": null, "force_ontap_version": null, "hostname": "<hostname_redacted>", "http_port": null, "https": true, "identity_preservation": null, "identity_preserve": null, "initialize": true, "key_filepath": null, "max_transfer_rate": null, "ontapi": null, "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "peer_options": null, "policy": null, "relationship_info_only": false, "relationship_state": "active", "relationship_type": null, "schedule": "hourly", "source_cluster": null, "source_endpoint": { "cluster": null, "consistency_group_volumes": null, "ipspace": null, "path": "us-stl-re-prd1:kube_pvc_6315d993_aef7_42fc_b955_b9cc288732eb", "svm": null }, "source_hostname": null, "source_password": null, "source_path": null, "source_snapshot": null, "source_username": null, "source_volume": null, "source_vserver": null, "state": "present", "transferring_time_out": 300, "update": true, "use_rest": "auto", "username": "<account_redacted>", "validate_certs": true, "validate_source_path": true } }, "item": "kube_pvc_6315d993_aef7_42fc_b955_b9cc288732eb", "msg": "Error patching SnapMirror: {'state': 'snapmirrored'}: calling: snapmirror/relationships/965de213-41e2-11ee-9a06-d039ea44454e: got HTTPSConnectionPool(host='<hostname_redacted>', port=443): Read timed out. (read timeout=60)."