Describe the bug
It appears that latestImage
may be getting set/updated multiple times at the end of a sync.
Steps to reproduce
Seems to happen in openshift CI w/ test_rsync_tls_normal
Expected behavior
Actual results
Additional context
PVC that is being recreated from latestImage
:
"Name: data-dest",
"Namespace: test-35701-0",
"StorageClass: gp3-csi",
"Status: Pending",
"Volume: ",
"Labels: <none>",
"Annotations: volume.beta.kubernetes.io/storage-provisioner: ebs.csi.aws.com",
" volume.kubernetes.io/selected-node: ip-10-0-232-126.us-east-2.compute.internal",
" volume.kubernetes.io/storage-provisioner: ebs.csi.aws.com",
"Finalizers: [kubernetes.io/pvc-protection]",
"Capacity: ",
"Access Modes: ",
"VolumeMode: Filesystem",
"DataSource:",
" APIGroup: snapshot.storage.k8s.io",
" Kind: VolumeSnapshot",
" Name: volsync-test-dst-20230103193317",
"Used By: compare-pvcs-7rlxt-lrj7l",
"Events:",
" Type Reason Age From Message",
" ---- ------ ---- ---- -------",
" Normal WaitForFirstConsumer 24m persistentvolume-controller waiting for first consumer to be created before binding",
" Warning ProvisioningFailed 24m (x5 over 24m) ebs.csi.aws.com_aws-ebs-csi-driver-controller-99f7b5f7-wrjs6_561cbe81-5cc6-4d69-b366-8bc7dae47703 failed to provision volume with StorageClass \"gp3-csi\": error getting handle for DataSource Type VolumeSnapshot by Name volsync-test-dst-20230103193317: snapshot volsync-test-dst-20230103193317 is not Ready",
" Warning ProvisioningFailed 5m34s (x9 over 24m) ebs.csi.aws.com_aws-ebs-csi-driver-controller-99f7b5f7-wrjs6_561cbe81-5cc6-4d69-b366-8bc7dae47703 failed to provision volume with StorageClass \"gp3-csi\": error getting handle for DataSource Type VolumeSnapshot by Name volsync-test-dst-20230103193317: snapshot volsync-test-dst-20230103193317 is currently being deleted",
" Normal ExternalProvisioning 4m49s (x84 over 24m) persistentvolume-controller waiting for a volume to be created, either by external provisioner \"ebs.csi.aws.com\" or manually created by system administrator",
" Normal Provisioning 34s (x15 over 24m) ebs.csi.aws.com_aws-ebs-csi-driver-controller-99f7b5f7-wrjs6_561cbe81-5cc6-4d69-b366-8bc7dae47703 External provisioner is provisioning volume for claim \"test-35701-0/data-dest\"",
ReplicationDestination:
"Name: test",
"Namespace: test-35701-0",
"Labels: <none>",
"Annotations: <none>",
"API Version: volsync.backube/v1alpha1",
"Kind: ReplicationDestination",
"Metadata:",
" Creation Timestamp: 2023-01-03T19:31:41Z",
" Generation: 1",
" Managed Fields:",
" API Version: volsync.backube/v1alpha1",
" Fields Type: FieldsV1",
" fieldsV1:",
" f:spec:",
" .:",
" f:rsyncTLS:",
" .:",
" f:accessModes:",
" f:capacity:",
" f:copyMethod:",
" Manager: OpenAPI-Generator",
" Operation: Update",
" Time: 2023-01-03T19:31:41Z",
" API Version: volsync.backube/v1alpha1",
" Fields Type: FieldsV1",
" fieldsV1:",
" f:status:",
" .:",
" f:conditions:",
" f:lastSyncDuration:",
" f:lastSyncStartTime:",
" f:lastSyncTime:",
" f:latestImage:",
" .:",
" f:apiGroup:",
" f:kind:",
" f:name:",
" f:rsyncTLS:",
" .:",
" f:address:",
" f:keySecret:",
" Manager: manager",
" Operation: Update",
" Subresource: status",
" Time: 2023-01-03T19:36:18Z",
" Resource Version: 47413",
" UID: 81ddb0e5-815f-494b-a9a1-e5cbeb799fdf",
"Spec:",
" Rsync TLS:",
" Access Modes:",
" ReadWriteOnce",
" Capacity: 1Gi",
" Copy Method: Snapshot",
"Status:",
" Conditions:",
" Last Transition Time: 2023-01-03T19:36:18Z",
" Message: Synchronization in-progress",
" Reason: SyncInProgress",
" Status: True",
" Type: Synchronizing",
" Last Sync Duration: 2m29.359876117s",
" Last Sync Start Time: 2023-01-03T19:36:18Z",
" Last Sync Time: 2023-01-03T19:36:18Z",
" Latest Image:",
" API Group: snapshot.storage.k8s.io",
" Kind: VolumeSnapshot",
" Name: volsync-test-dst-20230103193618",
" Rsync TLS:",
" Address: 172.30.145.15",
" Key Secret: volsync-rsync-tls-test",
"Events:",
" Type Reason Age From Message",
" ---- ------ ---- ---- -------",
" Normal PersistentVolumeClaimCreated 26m volsync-controller created PersistentVolumeClaim/volsync-test-dst to receive incoming data",
" Normal ServiceAddressAssigned 26m (x2 over 26m) volsync-controller listening on address 172.30.145.15 for incoming connections",
" Normal VolumeSnapshotCreated 25m volsync-controller created VolumeSnapshot/volsync-test-dst-20230103193317 from PersistentVolumeClaim/volsync-test-dst",
" Normal VolumeSnapshotCreated 24m volsync-controller created VolumeSnapshot/volsync-test-dst-20230103193341 from PersistentVolumeClaim/volsync-test-dst",
" Normal TransferStarted 21m (x4 over 26m) volsync-controller starting Job/volsync-rsync-tls-dst-test to receive data",
" Normal VolumeSnapshotCreated 21m volsync-controller created VolumeSnapshot/volsync-test-dst-20230103193618 from PersistentVolumeClaim/volsync-test-dst"
]
- LatestImage is
volsync-test-dst-20230103193618
, but the snapshot we're trying to restore is volsync-test-dst-20230103193317
. I'm not sure what explains the 3 minute gap.
- The source schedule is
0 0 1 1 *
, so it should only be syncing once (per year).
volsync-test-dst-20230103193618
is ready to use
- It looks like the transfer may have succeeded on the destination, but failed on the source?
- Source events:
"Events:",
" Type Reason Age From Message",
" ---- ------ ---- ---- -------",
" Normal VolumeSnapshotCreated 26m volsync-controller created VolumeSnapshot/volsync-source-src from PersistentVolumeClaim/data-source",
" Normal PersistentVolumeClaimCreated 25m volsync-controller created PersistentVolumeClaim/volsync-source-src from VolumeSnapshot/volsync-source-src",
" Normal TransferStarted 22m (x3 over 25m) volsync-controller starting Job/volsync-rsync-tls-src-source to transmit data",
" Warning TransferFailed 22m (x2 over 24m) volsync-controller mover Job backoff limit reached",
- Destination events:
```
"Events:",
" Type Reason Age From Message",
" ---- ------ ---- ---- -------",
" Normal PersistentVolumeClaimCreated 26m volsync-controller created PersistentVolumeClaim/volsync-test-dst to receive incoming data",
" Normal ServiceAddressAssigned 26m (x2 over 26m) volsync-controller listening on address 172.30.145.15 for incoming connections",
" Normal VolumeSnapshotCreated 25m volsync-controller created VolumeSnapshot/volsync-test-dst-20230103193317 from PersistentVolumeClaim/volsync-test-dst",
" Normal VolumeSnapshotCreated 24m volsync-controller created VolumeSnapshot/volsync-test-dst-20230103193341 from PersistentVolumeClaim/volsync-test-dst",
" Normal TransferStarted 21m (x4 over 26m) volsync-controller starting Job/volsync-rsync-tls-dst-test to receive data",
" Normal VolumeSnapshotCreated 21m volsync-controller created VolumeSnapshot/volsync-test-dst-20230103193618 from PersistentVolumeClaim/volsync-test-dst"
bug