Closed christian-naenny closed 2 years ago
The error {'message': \"entry doesn't exist\", 'code': '4', 'target': 'uuid'} is coming from ONTAP. Before attempting to break the relationship, it is put in quiesced state. So it seems the REST API call to quiesce the relationship was successful, but the call to break it failed.
We made a change in 21.20.0 to make sure to wait for the relationship to be in quiesced state before sending the break request. Before this, when using REST, we would immediately send the break request. Could you give it a try?
I'm sorry, I don't quite understand yet. What should I give a try?
Here's where I'm coming from: I already solved the problem of breaking the the snapmirror relationship using a script that uses the ONTAP CLI. I already have the code to quiesce the scheduler and then to break the snapmirror relationship after the status is "quiesced, idle". But now I would like to use the Ansible module to replace my custom code. Is there a different way of doing this? Is there a parameter I missed? I was expecting the module to actually quiesce the scheduler and then if the schedule has been quiesced to break the snapmirror relationship. What "entry" is ONTAP missing here?
Sorry, I meant upgrading your ONTAP collection from 21.17.3 to 21.20.0.
Ah yes, of course! I will update the ONTAP collection and try again!
Sorry, even after updating the netapp.ontap collection to version 21.20.0 I get the same "entry doesn't exist" error when I try to break the snapmirror connection.
$ ansible-galaxy collection list netapp.ontap
# /home/chn/.ansible/collections/ansible_collections
Collection Version
------------ -------
netapp.ontap 21.20.0
While running the playbook:
Using module file /home/chn/.ansible/collections/ansible_collections/netapp/ontap/plugins/modules/na_ontap_snapmirror.py
So far, we're not able to reproduce the issue in our labs. Still trying.
2 questions
Sorry for the delay. I had a few days of vacation...
Here are the answers to your questions:
"msg": "Error patching SnapMirror: {'state': 'broken_off'} - calling: snapmirror/relationships/5c9b50b5-741b-11ea-a1dc-00a098d90e1d: got {'message': \"entry doesn't exist\", 'code': '4', 'target': 'uuid'}."
Just to be sure, these are the the prerequisite packages in the venv I'm using to run the playbook:
ansible 5.6.0
ansible-core 2.12.4
netapp-lib 2021.6.25
requests 2.27.1
Yes, I assumed you were doing a vserver stop. I also assumed you are using two clusters.
The new error message also confirms you are using the latest collection, and the location where the issue is reported from.
This is puzzling, I could not reproduce the issues on 9.11 or 9.8. Since we're using the same UUID in the quiesce and break requests, it's surprising the first one succeeds and the second one fails.
I'll try with 9.8P9.
@christian-naenny let us know if your still having the issue with 9.8p9 if so please reopen the issue.
Summary
Sample code for the snapmirror operation:
When I set the relationship_state to "broken" the playbooks throws the error:
"msg": "calling: snapmirror/relationships/5c9b50b5-741b-11ea-a1dc-00a098d90e1d: got {'message': \"entry doesn't exist\", 'code': '4', 'target': 'uuid'}."
But after the execution and the error message the DR SVM reports a mirror state of "snapmirrored" and a relationship status of "quiesced"!
When I set the relationship_state to "active" for the next run of the playbook, it works just fine and the DR SVM reports a mirror state of "snapmirrored" and a relationship status of "idle"!
Component Name
pip
Ansible Version
ONTAP Collection Version
ONTAP Version
Playbook
Steps to Reproduce
Expected Results
I expect the snapmirror state of the DR SVM to be changed to "broken off" and the relationship status to "idle".
Actual Results