Skip to content

Commit

Permalink
add wrongly deleted lines from PR kubernetes-sigs#96
Browse files Browse the repository at this point in the history
  • Loading branch information
Famille LEFFONDRE authored and Famille LEFFONDRE committed Jan 28, 2020
1 parent 2e9d6fa commit f0068a4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/csi/service/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -467,13 +467,20 @@ func (s *service) NodeGetInfo(
}
cfg, err := cnsconfig.GetCnsconfig(cfgPath)
if err != nil {
if os.IsNotExist(err) {
klog.V(2).Infof("Config file not provided to node daemonset. Assuming non-topology aware cluster.")
return &csi.NodeGetInfoResponse{
NodeId: nodeID,
}, nil
}
klog.Errorf("Failed to read cnsconfig. Error: %v", err)
return nil, status.Errorf(codes.Internal, err.Error())
}
var accessibleTopology map[string]string
topology := &csi.Topology{}

if cfg.Labels.Zone != "" && cfg.Labels.Region != "" {
klog.V(2).Infof("Config file provided to node daemonset with zones and regions. Assuming topology aware cluster.")
vcenterconfig, err := cnsvsphere.GetVirtualCenterConfig(cfg)
if err != nil {
klog.Errorf("Failed to get VirtualCenterConfig from cns config. err=%v", err)
Expand Down

0 comments on commit f0068a4

Please sign in to comment.