Skip to content

na_ontap_snapmirror does not apply break if snapmirror is not healthy #312

@ansibleguy76

Description

@ansibleguy76

Summary

When I want to break the snapmirror when the snapmirror is unhealthy, in my case because the source volume was taking offline at some point and the snapmirror was unhealth : Failed to create Snapshot copy (volume is offline).

I online the source volume prior to the break, but the break still fails.

Component Name

na_ontap_snapmirror

Ansible Version

$ ansible --version
22.16

ONTAP Collection Version

$ ansible-galaxy collection list
version 23.2.0

ONTAP Version

NetApp Release 9.14.1P8: Fri Sep 13 07:12:27 UTC 2024

Playbook

netapp.ontap.na_ontap_snapmirror:
      <<: *auth
      relationship_state: broken
      destination_endpoint:
        path: "{{ snapmirror.destination.path }}"
      source_endpoint:
        path: "{{ snapmirror.source.path }}"
    delegate_to: localhost

Steps to Reproduce

offline the source volume
trigger snapmirror update
try to break the snapmirror

Expected Results

A force break being available or just break independent on the state.

Actual Results

79     # break the snapmirrors found
80   - name: "Break snapmirror relations from [{{ snapmirror_representation | default('') }}]"
       ^ column 5

failed: [localhost] (item=test:donotdelete_testrw -- BREAK --> svm001dr:testrw_dr) => 
    ansible_loop_var: snapmirror
    changed: false
    msg: snapmirror data are transferring
    snapmirror:
        _links:
            self:
                href: /api/snapmirror/relationships/07922456-d4d4-11f0-9000-00a098bd4884/
        destination:
            path: svm001dr:testrw_dr
        source:
            path: test:donotdelete_testrw
        uuid: 07922456-d4d4-11f0-9000-00a098bd4884

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions