-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restic Volume Populator proceeds if no valid snapshots found or s3 bucket is not reachable. #1211
Comments
From the logs above, this looks like the replicationdestination was successful - if no snapshots are found to be restored, the current behaviour is not to fail. Do you have an example where the replicationdestination fails but you see the volumepopulator proceed to make a PVC available? I'd like to see the replicationdestination yaml if possible. Normally the volumepopulator should not try to provision the PVC at all until the replicationDestination gets a latestImage set - which would happen after a successful restore on the replicationdestination. A couple more things:
|
hi @tesshuflower thanks for your response.
The invalid I think it's in the correct format, but it's possible I messed it up. Also there were valid snapshots that satisfied the
In the image above you can see where the replication destination found no valid snapshots and completed. I forgot to grab any screenshots, but immediately after the replication destination pod exited the workload (tautulli in this case) started with an empty PVC. I verified it by accessing the hosted page and seeing that it wanted me to do the initial configuration all over again. the s3 bucket I used is an internally hosted minio bucket, so I'm not sure exactly what info you want about it. I was having DNS issues while trying to bring up my cluster, and for some reason I haven't figured out the hostname for my minio instance could not be resolved which led to the issue posted above. I will try to recreate the situation and test it again later today. Please let me know if there's any more info I can provide. |
Thanks for this extra info - let me split this up into a few different things:
I do think perhaps there's an argument to be made to allow for a flag somewhere to say that you want the job to fail if no snapshots are found to be restored - by default however it does succeed, and this seems to be the intended behaviour for most of our restic users - in these gitopts scenarios where the entire thing is setup at once (replicationsource, replicationdestination source pvc as volume populated pvc), for first time deploys it would always fail if no data exists to be restored. See some discussions here: #1172 and #1181.
|
Describe the bug
I have found two cases where the volume populator will just give up and allow an empty pvc to be sent to the workload which is not what I think the expected behavior should be. The result of this is that once the empty pvc is attached to the workload, any replication sources for that PVC will immediately snapshot this incorrectly populated pvc, potentially removing good snapshots in the process.
I would expect the volume populator to stop on config error and not proceed further to avoid potential data loss.
The two scenarios I have found are:
restoreAsOf
field is incorrectly formattedThis was tested on v0.9.0 and v0.9.1
Steps to reproduce
restoreAsOf
fieldExpected behavior
As mentioned earlier, to avoid data loss the replication destination should not allow a PVC that wasn't populated to attach to the workload.
Actual results
Empty PVC attached to workload, replication source ran, and overwrote one of my backups with a now empty snapshot
The text was updated successfully, but these errors were encountered: