Repository navigation
feat(backup): record the last stored object in status.lastObject - #6
Merged
Merged
Conversation
A Stream Backup pod now writes the object key, size and duration to its termination message. The operator copies it from the successful pod of the last finished Job into status.lastObject, reading that pod with the uncached API reader, so it needs get and list on pods. A failed Job, a Job whose pods are gone or a pod that did not report keeps the previous object, so lastObject always names a dump that was stored. Stage Backups do not report. New metrics karkive_backup_last_size_bytes and karkive_backup_last_object_timestamp_seconds feed alert KArkiveBackupSizeDrop: the last object is below metrics.prometheusRule.backupSizeDropRatio (default 0.5) of the largest one in backupSizeDropWindow (default 7d), which usually means an empty or partial dump.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stream Backups report the object they stored, the operator keeps it in
status.lastObject, and a new metric and alert catch a dump that suddenly shrinks.report_objectinstream/common.shwritesobject=,size=,duration=to the container's termination message after the upload (or after the local write when S3 is off). Best effort: a backup that is stored never fails here.status.lastObject(key,sizeBytes,durationSeconds,jobName,completionTime) comes from the successful pod of the last finished Job. A failed Job, a Job whose pods are gone, or a pod that did not report keeps the previous object. Pods are read with the uncached API reader; the operator needsget/liston pods (config/rbacand the chart).karkive_backup_last_size_bytes,karkive_backup_last_object_timestamp_seconds, absent until an object is recorded.KArkiveBackupSizeDropwhen the last object is belowbackupSizeDropRatio(default0.5) of the largest inbackupSizeDropWindow(default7d);0turns it off.Adds an API field and an RBAC rule, so it ships as a minor release (0.7.0). Stage Backups are unchanged.