Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bharathsreekanth committed Sep 30, 2024
1 parent 3f7ef50 commit d426453
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion service/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1288,6 +1288,7 @@ func (s *service) ControllerPublishVolume(
var ipAddresses []string

ipAddresses, err = s.findNetworkInterfaceIPs()
Log.Printf("ControllerPublish - No network interfaces found, trying to get SDC IPs")
if err != nil || len(ipAddresses) == 0 {

// get SDC IPs if Network Interface IPs not found
Expand All @@ -1298,7 +1299,7 @@ func (s *service) ControllerPublishVolume(
return nil, status.Errorf(codes.NotFound, "%s", "received empty sdcIPs")
}
}
Log.Printf("ControllerPublish - Network Interface IPs for NFS: %v", ipAddresses)
Log.Printf("ControllerPublish - ipAddresses %v", ipAddresses)

externalAccess := s.opts.ExternalAccess
publishContext["host"] = ipAddresses[0]
Expand Down
1 change: 0 additions & 1 deletion service/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,6 @@ func (s *service) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolum
err = s.nodeProbe(ctx)
if err != nil {
Log.Error("nodeProbe failed with error :" + err.Error())
// return nil, err
}

volumePath := req.GetVolumePath()
Expand Down
6 changes: 5 additions & 1 deletion service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,11 @@ func (s *service) logCsiNodeTopologyKeys() error {
K8sClientset = k8sutils.Clientset
}

csiNodes, _ := K8sClientset.StorageV1().CSINodes().List(context.TODO(), metav1.ListOptions{})
csiNodes, err := K8sClientset.StorageV1().CSINodes().List(context.TODO(), metav1.ListOptions{})
if err != nil {
Log.WithError(err).Error("unable to get node list")
return err
}
node, err := s.NodeGetInfo(context.Background(), nil)
if node != nil {
Log.WithField("node info", node.NodeId).Info("NodeInfo ID")
Expand Down

0 comments on commit d426453

Please sign in to comment.