Thanks for using the TrueNAS Community Edition issue tracker! TrueNAS Enterprise users receive direct support for their reports from our support portal.

Replication fails with: can't compare offset-naive and offset-aware datetimes

Description

Replication replicating zvol snapshots with custom naming schema ( vmbk-%Y-%m-%d_%H-%M ) fails with "can't compare offset-naive and offset-aware datetimes" error after second run.

Steps to reproduce:

Have a script that creates custom named snapshots daily
Setup scheduled replication task that replicates those custom snapshots to a second pool
run the replication task once - it succeedes
once scheduled time arrives second and all future replication runs fail with "can't compare offset-naive and offset-aware datetimes"

The script I use to create the snapshots and the replication config example can be found here: https://github.com/ClassicGOD/truenas_scale_cold_vm_snap

Replication task was running fine for months on RC2. Issue started after updating to Release.

Other users mentioning the issue on forums: https://www.truenas.com/community/threads/replication-task-fails-on-second-run.98101/

Problem/Justification

None

Impact

None

Activity

Patrick M. Hausen 
April 20, 2022 at 8:31 PM

Thanks - applied manually, seems to work.

Vladimir Vinogradenko 
April 20, 2022 at 8:08 PM
(edited)

I am sorry, I forgot to include that patch into 13.0-RC1. Release will surely have it.

Patrick M. Hausen 
April 20, 2022 at 6:57 PM

Doesn't work in CORE 13-RC1, either. I hacked up a "fix" - not sure if that is the correct way to do that:

https://www.truenas.com/community/threads/truenas-13-0-rc1-has-been-released.100628/#post-693348

Kind regards,
Patrick

Vladimir Vinogradenko 
April 13, 2022 at 10:58 AM

yes, that's exactly the bug we'll fix in 22.02.1

Simon Larsen 
April 12, 2022 at 1:19 PM
(edited)

and everyone else.

I just skimmed quickly through the comments and I didn't see anyone mentioning it so I want to let you know that someone on the Truenas Commuity Forum (see post #15) have found what seems to be the issue - namely setting the different retention periods on the snapshot task and the replication task. Apparently setting the two retention periods identically, solves the problem.

I haven't tries this myself but I will later today. Sorry if this was already mentioned.

UPDATE: I now tried the solution myself and it seems to work.

Additionally I think I have another work around for whom identical retention periods on source and destination is not a viable option.

If the snapshots you want to replicate have a distinct name (e.g. "movies-backup-%Y-%m-%d...."), then instead of selecting a snapshot task, select "Replicate specific snapshots" and enter "movies-backup-.%". Remember to define a schedule now that the replication task is not linked to a snapshot task.

Complete

Details

Assignee

Reporter

Labels

Impact

Time remaining

0m

Components

Affects versions

Priority

Katalon Platform

Created February 24, 2022 at 7:39 AM
Updated July 1, 2022 at 5:53 PM
Resolved March 3, 2022 at 4:44 PM