Skip to content

Commit 20b4deb

Browse files
committed
added debug logging
Signed-off-by: Scott Seago <[email protected]>
1 parent 9589103 commit 20b4deb

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

pkg/controller/backup_storage_location_controller.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package controller
1818

1919
import (
2020
"context"
21+
"os/user"
2122
"strings"
2223
"time"
2324

@@ -123,8 +124,16 @@ func (r *backupStorageLocationReconciler) Reconcile(ctx context.Context, req ctr
123124
defer func() {
124125
location.Status.LastValidationTime = &metav1.Time{Time: time.Now().UTC()}
125126
if err != nil {
127+
currentUser, err2 := user.Current()
128+
uid := "error getting user"
129+
gid := "error getting user"
130+
if err2 == nil {
131+
uid = currentUser.Uid
132+
gid = currentUser.Gid
133+
}
126134
log.Info("BackupStorageLocation is invalid, marking as unavailable")
127-
err = errors.Wrapf(err, "BackupStorageLocation %q is unavailable", location.Name)
135+
log.Infof("BSL %q, velero uid/gid %v/%v, config %v", location.Name, uid, gid, location.Spec.Config)
136+
err = errors.Wrapf(err, "BackupStorageLocation %q is unavailable, velero uid/gid %v/%v, config %v", location.Name, uid, gid, location.Spec.Config)
128137
unavailableErrors = append(unavailableErrors, err.Error())
129138
location.Status.Phase = velerov1api.BackupStorageLocationPhaseUnavailable
130139
location.Status.Message = err.Error()

0 commit comments

Comments
 (0)