-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix issue 5881 #5894
Fix issue 5881 #5894
Conversation
Signed-off-by: Lyndon-Li <[email protected]>
b2a32aa
to
08b8498
Compare
Codecov Report
@@ Coverage Diff @@
## main #5894 +/- ##
==========================================
- Coverage 40.84% 40.16% -0.68%
==========================================
Files 248 249 +1
Lines 21648 22044 +396
==========================================
+ Hits 8843 8855 +12
- Misses 12160 12543 +383
- Partials 645 646 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
if volume.PersistentVolumeClaim != nil { | ||
t.pvcs.Insert(key(pod.Namespace, volume.PersistentVolumeClaim.ClaimName)) | ||
// Track indicates a volume from a pod should be snapshotted by pod volume backup. | ||
func (t *pvcSnapshotTracker) Track(pod *corev1api.Pod, volumeName string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Track .vs. Take is a little confusing, how about pass the status or mode as a parameter and make the naming more explicit?
so the caller will call tracker.Track(pod, volume, VOLUME_SNAPSHOT)
or tracker.Track(pod, volume, PODVOLUME_BACKUP)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have been thinking of how to clearly distinguish them, actually:
- Track means the volume is decided to be handled by PVB according to rules and annotations. We need to record this situation because we don't want the BIA and volume snapshotter to process the volume again
- Take means the volume has been processed by PVB successfully. We need to record this situation, because we want the volumes that ought to be processed by PVB but missed by the backup with the 1st pod should be processed by backups with other pods. (In the case of RWX mount)
Therefore, if we want to use status, the status should be something like:
- VestedToPVB
- ProcessedByPVB
What do you think? @reasonerjt
This is to fix issue 5881, enhance the PVB tracker in two modes, Track and Taken
Fix issue #5881