-
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
Issue 7027: backup exposer -- don't assume first volume as the backup volume #7038
Conversation
… volume Signed-off-by: Lyndon-Li <[email protected]>
ff526f7
to
8e44240
Compare
Codecov Report
@@ Coverage Diff @@
## main #7038 +/- ##
==========================================
+ Coverage 61.03% 61.12% +0.08%
==========================================
Files 252 252
Lines 26900 26910 +10
==========================================
+ Hits 16419 16449 +30
+ Misses 9319 9297 -22
- Partials 1162 1164 +2
|
return nil, errors.Errorf("backup pod %s doesn't have the expected backup volume", pod.Name) | ||
} | ||
|
||
curLog.WithField("pod", pod.Name).Infof("Backup volume is found in pod at index %v", i) |
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.
Should this be debug log ?
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.
It is fine to be an info log, as same as other logs in the same function, because expose is not a frequently called operation and on the other hand, it is hard to troubleshoot, so we would rather add some info logs, so that they could give helps whenever we need to debug the expose process.
@@ -204,6 +204,7 @@ func (e *csiSnapshotExposer) GetExposed(ctx context.Context, ownerObject corev1. | |||
|
|||
backupPodName := ownerObject.Name | |||
backupPVCName := ownerObject.Name | |||
volumeName := string(ownerObject.UID) |
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.
Why the volumeName
is equal to ownerObject.UID
?
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.
Because we name the volume as ownerObject.UID
when creating the backup pod, so it is always true that the backup volume is with the name of ownerObject.UID
in the backup pod.
See the createBackupPod
function for how the backup pod is created.
Fix issue #7027, data mover backup exposer should not assume the first volume as the backup volume in backup pod