yboetz / pyznap

ZFS snapshot tool written in python
GNU General Public License v3.0
198 stars 35 forks source link

Retry mecanism for zfs zend #69

Closed maireanu closed 4 years ago

maireanu commented 4 years ago

It is possible to add an mechanism when a snapshot is send and there is exeception, to be possible to retry and resend the snapshot.

Example:

  1. sending on snapshot ,
  2. an error appear
    • warning: cannot send 'pool/TenantName@pyznap_2020-08-28_00:00:44_daily': Broken pipe
    • ERROR: Error while sending to root@0.0.0.0:pool/TenantName
  3. retry sending the snapshot.
yboetz commented 4 years ago

Should be possible to add a retry loop around the send_snap method. I haven't really had time to work on pyznap recently though, so no promises on when I might implement this.

Fmajor commented 4 years ago

see #70

maireanu commented 4 years ago

Changes look good. I will make some tests to check it out, I will return with a reply after the tests

Fmajor commented 4 years ago

Hi maireanu,

70 is colse to be merged, we need more tests, could you do it?

Changes look good. I will make some tests to check it out, I will return with a reply after the tests

yboetz commented 4 years ago

The new release adds the retries and retry_interval options. You can specify how many times pyznap tries to send, and how long to wait in between tries. Thanks to Fmajor for this!