infernix / pbsnappy

pbsnappy - automatically make volume snapshots for ProfitBricks servers
GNU General Public License v3.0
0 stars 0 forks source link

Snapshots sometimes get prematurely deleted #1

Open infernix opened 8 years ago

infernix commented 8 years ago

PB creates snapshots not at the exact time of sending the snapshot command; they are queued. So when we're checking if it's outdated, it may have a different timestamp than what we're expecting.

Possible fixes:

infernix commented 8 years ago

Or together with the first option, create a margin of error (proably 10-15 minutes) to accomodate for the queueing effects. Need to first determine the average timedeltas.

infernix commented 8 years ago

Some log entries to illustrate the issue:

OS-Snapshot-05/04/2016' deleted, older than 1 retention days (1 days, 0 seconds)
OS-Snapshot-05/03/2016' deleted, older than 1 retention days (2 days, 0 seconds
OS-Snapshot-05/01/2016' kept, not older than 1 retention days (0 days, 86399 seconds)
OS-Snapshot-04/30/2016' kept, not older than 1 retention days (0 days, 86398 seconds)
OS-Snapshot-04/30/2016' deleted, older than 1 retention days (1 days, 86398 seconds)
OS-Snapshot-04/29/2016' deleted, older than 1 retention days (1 days, 86396 seconds)
OS-Snapshot-04/29/2016' kept, not older than 1 retention days (0 days, 86397 seconds)
OS-Snapshot-04/28/2016' kept, not older than 1 retention days (0 days, 85162 seconds)
OS-Snapshot-04/28/2016' deleted, older than 1 retention days (1 days, 85160 seconds)

Looks like a 30 minute margin should do the trick.