Skip to content

Commit cf0ceae

Browse files
committed
add logs
Signed-off-by: Ashima-Ashima1 <[email protected]>
1 parent 10aae1e commit cf0ceae

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

config/manager/kustomization.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
44
kind: Kustomization
55
images:
66
- name: controller
7-
newName: bhagyak1/ibm-object-csi-driver-operator
8-
newTag: apr1801
7+
newName: ashimagarg/csi
8+
newTag: "52"

controllers/recoverstalevolume_controller.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,17 +303,21 @@ func createK8sClient() (*KubernetesClient, error) {
303303
}, nil
304304
}
305305

306-
func fetchVolumeStatsFromNodeServerLogs(ctx context.Context, nodeServerPod, ns string, logTailLines int64, isTest bool) (map[string]string, error) {
306+
func fetchVolumeStatsFromNodeServerLogs(ctx context.Context, nodeServerPod, namespace string, logTailLines int64,
307+
isTest bool) (map[string]string, error) {
308+
staleVolLog.Info("Input Parameters: ", "nodeServerPod", nodeServerPod, "namespace", namespace, "isTest", isTest)
307309
podLogOpts := &corev1.PodLogOptions{
308310
Container: csiNodePodPrefix,
309311
TailLines: &logTailLines,
310312
}
313+
staleVolLog.Info("Pod Options: ", podLogOpts)
311314

312315
k8sClient, err := kubeClient()
313316
if err != nil {
314317
return nil, err
315318
}
316-
request := k8sClient.Clientset.CoreV1().Pods(ns).GetLogs(nodeServerPod, podLogOpts)
319+
request := k8sClient.Clientset.CoreV1().Pods(namespace).GetLogs(nodeServerPod, podLogOpts)
320+
staleVolLog.Info("Request: ", request)
317321

318322
nodePodLogs, err := request.Stream(ctx)
319323
if err != nil {
@@ -327,6 +331,7 @@ func fetchVolumeStatsFromNodeServerLogs(ctx context.Context, nodeServerPod, ns s
327331
return nil, err
328332
}
329333
nodeServerPodLogs := buf.String()
334+
staleVolLog.Info("nodeServerPodLogs: ", nodeServerPodLogs)
330335

331336
if isTest {
332337
nodeServerPodLogs = testNodeServerPodLogs

0 commit comments

Comments
 (0)