Skip to content

Commit db7995f

Browse files
YashwantGohokarl-technicore
authored andcommitted
Bug fix for topology collision error in CSI node driver
1 parent bd47007 commit db7995f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

pkg/csi/driver/bv_node.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,10 +572,11 @@ func (d BlockVolumeNodeDriver) NodeGetInfo(ctx context.Context, req *csi.NodeGet
572572
ad, err := d.util.LookupNodeAvailableDomain(d.KubeClient, d.nodeID)
573573

574574
if err != nil {
575-
d.logger.With(zap.Error(err)).With("nodeId", d.nodeID, "availableDomain", ad).Error("Available domain of node missing.")
575+
d.logger.With(zap.Error(err)).With("nodeId", d.nodeID, "availabilityDomain", ad).Error("Failed to get availability domain of node from kube api server.")
576+
return nil, status.Error(codes.Internal, "Failed to get availability domain of node from kube api server.")
576577
}
577578

578-
d.logger.With("nodeId", d.nodeID, "availableDomain", ad).Info("Available domain of node identified.")
579+
d.logger.With("nodeId", d.nodeID, "availabilityDomain", ad).Info("Availability domain of node identified.")
579580
return &csi.NodeGetInfoResponse{
580581
NodeId: d.nodeID,
581582
MaxVolumesPerNode: maxVolumesPerNode,

pkg/csi/driver/fss_node.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,10 +417,11 @@ func (d FSSNodeDriver) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequ
417417
ad, err := d.util.LookupNodeAvailableDomain(d.KubeClient, d.nodeID)
418418

419419
if err != nil {
420-
d.logger.With(zap.Error(err)).With("nodeId", d.nodeID, "availableDomain", ad).Error("Available domain of node missing.")
420+
d.logger.With(zap.Error(err)).With("nodeId", d.nodeID, "availabilityDomain", ad).Error("Failed to get availability domain of node from kube api server.")
421+
return nil, status.Error(codes.Internal, "Failed to get availability domain of node from kube api server.")
421422
}
422423

423-
d.logger.With("nodeId", d.nodeID, "availableDomain", ad).Info("Available domain of node identified.")
424+
d.logger.With("nodeId", d.nodeID, "availabilityDomain", ad).Info("Availability domain of node identified.")
424425
return &csi.NodeGetInfoResponse{
425426
NodeId: d.nodeID,
426427
// make sure that the driver works on this particular AD only

0 commit comments

Comments
 (0)