Project

General

Profile

Actions

Bug #17928

closed

import-diff doesn't work as what I expected

Added by cory gu over 7 years ago. Updated almost 7 years ago.

Status:
Won't Fix
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

rbd export-diff can export the variation of src image between two snapshots: snap1, snap2.
Supose you have already done the snap1 import to dest image, then you can use import-diff to dest image, and will get dest@snap2, and dest@snap2 is exactly same as src@snap2.

However, this works on the assumption: the dest image's header version does not change since the latest snap.
For example, before import the diff of snap1 and snap2 to dest image, we make some writes to dest image, so the dest header is not same as dest@snap1. The following import diff operation of variation of snap1 and snap2 become meaningless. Because in this situation, dest@snap2 is not same as src@snap2.

In summary, if src@snap1==dest@snap1, then export-diff src@snap1_between_snap2 to import-diff dest, we should get dest@snap2==src@snap2, no matter dest header version changed or not.

Actions #1

Updated by Jason Dillaman over 7 years ago

  • Project changed from Ceph to rbd
  • Status changed from New to Need More Info

@Cory: I am not sure I am 100% following what you are saying. Are you expecting that 'import-diff' should automatically wipe the contents of the destination image back to 'snap1' before it proceeds with the import? I think the majority of use-cases for export-diff/import-diff are for backup purposes where you would never expect the destination image to be updated (except by import-diff). In your case, and assuming my interpretation is correct, you could just run 'rbd snap rollback image@snap1' prior to running 'import-diff' since I'd be hesitant to impose that rollback burden on everyone. Note that there is a long outstanding feature ticket to add some validation to import-diff so that it won't permit the import-diff if you get into a situation where someone mucked w/ the destination image.

Actions #2

Updated by Jason Dillaman almost 7 years ago

  • Status changed from Need More Info to Won't Fix
Actions

Also available in: Atom PDF