]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
fixed snapshot_mirror.py wip-jcollin-testing-24022026
authorJos Collin <jcollin@redhat.com>
Tue, 24 Feb 2026 12:17:10 +0000 (17:47 +0530)
committerJos Collin <jcollin@redhat.com>
Tue, 24 Feb 2026 12:17:10 +0000 (17:47 +0530)
Signed-off-by: Jos Collin <jcollin@redhat.com>
src/pybind/mgr/mirroring/fs/snapshot_mirror.py

index 3d4f88a6e0e7f33bdd2d5f67effe6f91cccacdee..51a69c10945ffd2b2dc5abc3758aa52c0e6cf30f 100644 (file)
@@ -208,11 +208,12 @@ class FSPolicy:
                     continue
                 elif action_type == ActionType.MAP_UPDATE:
                     # take care to not overwrite purge status
-                    update_map[dir_path] = {'version': 1,
-                                            'instance_id': lookup_info['instance_id'],
-                                            'last_shuffled': lookup_info['mapped_time'],
-                                            'sync_latest_snapshot': lookup_info['sync_latest_snapshot'],
-                                            'sync_from_snapshot': lookup_info['sync_from_snapshot']
+                    update_map[dir_path] = {
+                        'version': 1,
+                        'instance_id': lookup_info['instance_id'],
+                        'last_shuffled': lookup_info['mapped_time'],
+                        'sync_latest_snapshot': lookup_info['sync_latest_snapshot'] if 'sync_latest_snapshot' in lookup_info else False,
+                        'sync_from_snapshot': lookup_info['sync_from_snapshot'] if 'sync_from_snapshot' in lookup_info else None
                     }
                     if lookup_info['purging']:
                         update_map[dir_path]['purging'] = 1