Skip to content

Commit ce9e271

Browse files
authored
Stale LUKS mappers revisited
1 parent df231f9 commit ce9e271

File tree

9 files changed

+461
-201
lines changed

9 files changed

+461
-201
lines changed

frontend/csi/node_helpers/kubernetes/plugin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,13 @@ func (h *helper) AddPublishedPath(ctx context.Context, volumeID, pathToAdd strin
192192

193193
volTrackingInfo, err := h.ReadTrackingInfo(ctx, volumeID)
194194
if err != nil {
195-
return fmt.Errorf("failed to read the tracking file; %v", err)
195+
return fmt.Errorf("failed to read the tracking file; %w", err)
196196
}
197197

198198
volTrackingInfo.PublishedPaths[pathToAdd] = struct{}{}
199199

200200
if err := h.WriteTrackingInfo(ctx, volumeID, volTrackingInfo); err != nil {
201-
return fmt.Errorf("failed to update the tracking file; %v", err)
201+
return fmt.Errorf("failed to update the tracking file; %w", err)
202202
}
203203

204204
h.publishedPaths[volumeID] = volTrackingInfo.PublishedPaths

frontend/csi/node_server.go

Lines changed: 27 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -644,12 +644,12 @@ func (p *Plugin) nodeExpandVolume(
644644
devicePath := publishInfo.DevicePath
645645
if convert.ToBool(publishInfo.LUKSEncryption) {
646646
if !luks.IsLegacyDevicePath(devicePath) {
647-
devicePath, err = p.devices.GetLUKSDevicePathForVolume(ctx, volumeId)
647+
devicePath, err = p.devices.GetLUKSDeviceForMultipathDevice(devicePath)
648648
if err != nil {
649649
Logc(ctx).WithFields(LogFields{
650650
"volumeId": volumeId,
651651
"publishedPath": publishInfo.DevicePath,
652-
}).WithError(err).Error("Failed to get LUKS device path for volume.")
652+
}).WithError(err).Error("Failed to get LUKS device path from device path.")
653653
return status.Error(codes.Internal, err.Error())
654654
}
655655
}
@@ -1468,18 +1468,15 @@ func (p *Plugin) nodeUnstageFCPVolume(
14681468
publishInfo.DevicePath = dmPath
14691469
}
14701470
} else {
1471-
// If not using luks legacy device path we need to find the LUKS mapper device.
1472-
luksMapperPath, err = p.devices.GetLUKSDevicePathForVolume(ctx, req.GetVolumeId())
1471+
// If not using LUKS legacy device path, we need to find the LUKS mapper device.
1472+
luksMapperPath, err = p.devices.GetLUKSDeviceForMultipathDevice(publishInfo.DevicePath)
14731473
if err != nil {
1474-
// If the LUKS device is not found, the functional difference is negligible to unstage.
1475-
// But it may be useful to log at different levels for observability.
1476-
log := Logc(ctx).WithFields(fields).WithError(err)
1477-
if errors.IsNotFoundError(err) {
1478-
log.Warn("Failed to get LUKS device path for volume.")
1479-
} else {
1480-
log.Debug("Could not determine LUKS device path for volume.")
1474+
if !errors.IsNotFoundError(err) {
1475+
Logc(ctx).WithFields(fields).WithError(err).Warn(
1476+
"Could not determine LUKS device path from multipath device. " +
1477+
"Continuing with device removal.")
14811478
}
1482-
log.Debug("Continuing with device removal.")
1479+
Logc(ctx).WithFields(fields).Info("No LUKS device path found from multipath device.")
14831480
}
14841481
}
14851482
err = p.devices.EnsureLUKSDeviceClosedWithMaxWaitLimit(ctx, luksMapperPath)
@@ -1522,10 +1519,11 @@ func (p *Plugin) nodeUnstageFCPVolume(
15221519
"multipathDevice": deviceInfo.MultipathDevice,
15231520
}
15241521

1525-
luksMapperPath, err = p.devices.GetLUKSDevicePathForVolume(ctx, req.GetVolumeId())
1522+
luksMapperPath, err = p.devices.GetLUKSDeviceForMultipathDevice(deviceInfo.MultipathDevice)
15261523
if err != nil {
15271524
if !errors.IsNotFoundError(err) {
1528-
Logc(ctx).WithFields(fields).WithError(err).Error("Failed to get LUKS device path from multipath device.")
1525+
Logc(ctx).WithFields(fields).
1526+
WithError(err).Error("Failed to get LUKS device path from multipath device.")
15291527
return err
15301528
}
15311529
Logc(ctx).WithFields(fields).Info("No LUKS device path found from multipath device.")
@@ -1997,7 +1995,7 @@ func (p *Plugin) nodeUnstageISCSIVolume(
19971995
if convert.ToBool(publishInfo.LUKSEncryption) {
19981996
var err error
19991997
var luksMapperPath string
2000-
fields := LogFields{"device": publishInfo.DevicePath, "volume": req.GetVolumeId()}
1998+
fields := LogFields{"device": publishInfo.DevicePath}
20011999
// Set device path to dm device to correctly verify legacy volumes.
20022000
if luks.IsLegacyDevicePath(publishInfo.DevicePath) {
20032001
luksMapperPath = publishInfo.DevicePath
@@ -2011,22 +2009,17 @@ func (p *Plugin) nodeUnstageISCSIVolume(
20112009
publishInfo.DevicePath = dmPath
20122010
}
20132011
} else {
2014-
// Use the volume ID to get the LUKS mapper path.
2015-
// This should always work if the mapper is still present.
2016-
luksMapperPath, err = p.devices.GetLUKSDevicePathForVolume(ctx, req.GetVolumeId())
2012+
// If not using LUKS legacy device path, we need to find the LUKS mapper device.
2013+
luksMapperPath, err = p.devices.GetLUKSDeviceForMultipathDevice(publishInfo.DevicePath)
20172014
if err != nil {
2018-
// If the LUKS device is not found, the functional difference is negligible to unstage.
2019-
// But it may be useful to log at different levels for observability.
2020-
log := Logc(ctx).WithFields(fields).WithError(err)
2021-
if errors.IsNotFoundError(err) {
2022-
log.Warn("Failed to get LUKS device path for volume.")
2023-
} else {
2024-
log.Debug("Could not determine LUKS device path for volume.")
2015+
if !errors.IsNotFoundError(err) {
2016+
Logc(ctx).WithFields(fields).WithError(err).Warn(
2017+
"Could not determine LUKS device path from multipath device. " +
2018+
"Continuing with device removal.")
20252019
}
2026-
log.Debug("Continuing with device removal.")
2020+
Logc(ctx).WithFields(fields).Info("No LUKS device path found from multipath device.")
20272021
}
20282022
}
2029-
20302023
err = p.devices.EnsureLUKSDeviceClosedWithMaxWaitLimit(ctx, luksMapperPath)
20312024
if err != nil {
20322025
Logc(ctx).WithError(err).Debug("Unable to remove LUKS device. Continuing with tracking file removal.")
@@ -2077,7 +2070,7 @@ func (p *Plugin) nodeUnstageISCSIVolume(
20772070
"multipathDevice": deviceInfo.MultipathDevice,
20782071
}
20792072

2080-
luksMapperPath, err = p.devices.GetLUKSDevicePathForVolume(ctx, req.GetVolumeId())
2073+
luksMapperPath, err = p.devices.GetLUKSDeviceForMultipathDevice(deviceInfo.MultipathDevice)
20812074
if err != nil {
20822075
if !errors.IsNotFoundError(err) {
20832076
Logc(ctx).WithFields(fields).WithError(err).Error("Failed to get LUKS device path from multipath device.")
@@ -3093,19 +3086,14 @@ func (p *Plugin) nodeUnstageNVMeVolume(
30933086
"publishedPath": publishInfo.DevicePath,
30943087
}
30953088

3096-
// Use the volume ID to get the LUKS mapper path.
3097-
// This should always work if the mapper is still present.
3098-
luksMapperPath, err = p.devices.GetLUKSDevicePathForVolume(ctx, req.GetVolumeId())
3089+
luksMapperPath, err = p.devices.GetLUKSDevicePathForDevicePath(ctx, devicePath)
30993090
if err != nil {
3100-
// If the LUKS device is not found, the functional difference is negligible to unstage.
3101-
// But it may be useful to log at different levels for observability.
3102-
log := Logc(ctx).WithFields(fields).WithError(err)
3103-
if errors.IsNotFoundError(err) {
3104-
log.Warn("Failed to get LUKS device path for volume.")
3105-
} else {
3106-
log.Debug("Could not determine LUKS device path for volume.")
3091+
if !errors.IsNotFoundError(err) {
3092+
Logc(ctx).WithFields(fields).WithError(err).Error("Failed to get LUKS device path from device path.")
3093+
return &csi.NodeUnstageVolumeResponse{}, err
31073094
}
3108-
log.Debug("Continuing with device removal.")
3095+
Logc(ctx).WithFields(fields).WithError(err).Debug("Failed to get LUKS device path from device path. " +
3096+
"Device may already be removed.")
31093097
}
31103098

31113099
if luksMapperPath != "" {

frontend/csi/node_server_test.go

Lines changed: 20 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2131,7 +2131,7 @@ func TestNodeUnstageISCSIVolume(t *testing.T) {
21312131
getDeviceClient: func() devices.Devices {
21322132
mockDeviceClient := mock_devices.NewMockDevices(gomock.NewController(t))
21332133
mockDeviceClient.EXPECT().GetMultipathDeviceBySerial(gomock.Any(), gomock.Any())
2134-
mockDeviceClient.EXPECT().GetLUKSDevicePathForVolume(gomock.Any(), gomock.Any()).Return(mockDevicePath, nil)
2134+
mockDeviceClient.EXPECT().GetLUKSDeviceForMultipathDevice(gomock.Any()).Return(mockDevicePath, nil)
21352135
mockDeviceClient.EXPECT().EnsureLUKSDeviceClosedWithMaxWaitLimit(gomock.Any(), mockDevicePath).Return(nil)
21362136
mockDeviceClient.EXPECT().EnsureLUKSDeviceClosed(gomock.Any(), mockDevicePath).Return(nil)
21372137
mockDeviceClient.EXPECT().RemoveMultipathDeviceMappingWithRetries(gomock.Any(), gomock.Any(),
@@ -2178,7 +2178,7 @@ func TestNodeUnstageISCSIVolume(t *testing.T) {
21782178
getDeviceClient: func() devices.Devices {
21792179
mockDeviceClient := mock_devices.NewMockDevices(gomock.NewController(t))
21802180
mockDeviceClient.EXPECT().GetMultipathDeviceBySerial(gomock.Any(), gomock.Any())
2181-
mockDeviceClient.EXPECT().GetLUKSDevicePathForVolume(gomock.Any(), gomock.Any()).Return(mockDevicePath, nil)
2181+
mockDeviceClient.EXPECT().GetLUKSDeviceForMultipathDevice(gomock.Any()).Return(mockDevicePath, nil)
21822182
mockDeviceClient.EXPECT().EnsureLUKSDeviceClosedWithMaxWaitLimit(gomock.Any(), mockDevicePath).
21832183
Return(nil)
21842184
mockDeviceClient.EXPECT().EnsureLUKSDeviceClosed(gomock.Any(), mockDevicePath).Return(nil)
@@ -2223,7 +2223,7 @@ func TestNodeUnstageISCSIVolume(t *testing.T) {
22232223
getDeviceClient: func() devices.Devices {
22242224
mockDeviceClient := mock_devices.NewMockDevices(gomock.NewController(t))
22252225
mockDeviceClient.EXPECT().GetMultipathDeviceBySerial(gomock.Any(), gomock.Any())
2226-
mockDeviceClient.EXPECT().GetLUKSDevicePathForVolume(gomock.Any(), gomock.Any()).Return(mockDevicePath, nil)
2226+
mockDeviceClient.EXPECT().GetLUKSDeviceForMultipathDevice(gomock.Any()).Return(mockDevicePath, nil)
22272227
mockDeviceClient.EXPECT().EnsureLUKSDeviceClosedWithMaxWaitLimit(gomock.Any(), mockDevicePath).
22282228
Return(fmt.Errorf("mock error"))
22292229
return mockDeviceClient
@@ -2242,7 +2242,7 @@ func TestNodeUnstageISCSIVolume(t *testing.T) {
22422242
getDeviceClient: func() devices.Devices {
22432243
mockDeviceClient := mock_devices.NewMockDevices(gomock.NewController(t))
22442244
mockDeviceClient.EXPECT().GetMultipathDeviceBySerial(gomock.Any(), gomock.Any())
2245-
mockDeviceClient.EXPECT().GetLUKSDevicePathForVolume(gomock.Any(), gomock.Any()).Return(mockDevicePath, nil)
2245+
mockDeviceClient.EXPECT().GetLUKSDeviceForMultipathDevice(gomock.Any()).Return(mockDevicePath, nil)
22462246
mockDeviceClient.EXPECT().EnsureLUKSDeviceClosedWithMaxWaitLimit(gomock.Any(), mockDevicePath).
22472247
Return(nil)
22482248
mockDeviceClient.EXPECT().RemoveMultipathDeviceMappingWithRetries(gomock.Any(), gomock.Any(),
@@ -2317,8 +2317,7 @@ func TestNodeUnstageISCSIVolume(t *testing.T) {
23172317
return mockDeviceClient
23182318
},
23192319
},
2320-
// mockDeviceClient.EXPECT().GetLUKSDevicePathForVolume(gomock.Any(), gomock.Any()).Return(mockDevicePath, nil)
2321-
"SAN: iSCSI unstage: GetLUKSDevicePathForVolume error": {
2320+
"SAN: iSCSI unstage: GetLUKSDeviceForMultipathDevice error": {
23222321
assertError: assert.Error,
23232322
request: NewNodeUnstageVolumeRequestBuilder().Build(),
23242323
publishInfo: NewVolumePublishInfoBuilder(TypeiSCSIVolumePublishInfo).WithLUKSEncryption("true").Build(),
@@ -2338,8 +2337,8 @@ func TestNodeUnstageISCSIVolume(t *testing.T) {
23382337
getDeviceClient: func() devices.Devices {
23392338
mockDeviceClient := mock_devices.NewMockDevices(gomock.NewController(t))
23402339
mockDeviceClient.EXPECT().GetMultipathDeviceBySerial(gomock.Any(), gomock.Any())
2341-
mockDeviceClient.EXPECT().GetLUKSDevicePathForVolume(gomock.Any(),
2342-
gomock.Any()).Return(mockDevicePath, errors.New("mock error"))
2340+
mockDeviceClient.EXPECT().GetLUKSDeviceForMultipathDevice(gomock.Any()).Return("", fmt.Errorf(
2341+
"mock error"))
23432342
return mockDeviceClient
23442343
},
23452344
},
@@ -2359,7 +2358,7 @@ func TestNodeUnstageISCSIVolume(t *testing.T) {
23592358
getDeviceClient: func() devices.Devices {
23602359
mockDeviceClient := mock_devices.NewMockDevices(gomock.NewController(t))
23612360
mockDeviceClient.EXPECT().GetMultipathDeviceBySerial(gomock.Any(), gomock.Any())
2362-
mockDeviceClient.EXPECT().GetLUKSDevicePathForVolume(gomock.Any(), gomock.Any()).Return(mockDevicePath, nil)
2361+
mockDeviceClient.EXPECT().GetLUKSDeviceForMultipathDevice(gomock.Any()).Return(mockDevicePath, nil)
23632362
mockDeviceClient.EXPECT().EnsureLUKSDeviceClosedWithMaxWaitLimit(gomock.Any(), mockDevicePath).
23642363
Return(nil)
23652364
return mockDeviceClient
@@ -2393,7 +2392,7 @@ func TestNodeUnstageISCSIVolume(t *testing.T) {
23932392
getDeviceClient: func() devices.Devices {
23942393
mockDeviceClient := mock_devices.NewMockDevices(gomock.NewController(t))
23952394
mockDeviceClient.EXPECT().GetMultipathDeviceBySerial(gomock.Any(), gomock.Any())
2396-
mockDeviceClient.EXPECT().GetLUKSDevicePathForVolume(gomock.Any(), gomock.Any()).Return(mockDevicePath, nil)
2395+
mockDeviceClient.EXPECT().GetLUKSDeviceForMultipathDevice(gomock.Any()).Return(mockDevicePath, nil)
23972396
mockDeviceClient.EXPECT().EnsureLUKSDeviceClosedWithMaxWaitLimit(gomock.Any(), mockDevicePath).
23982397
Return(nil)
23992398
mockDeviceClient.EXPECT().EnsureLUKSDeviceClosed(gomock.Any(), mockDevicePath).Return(nil)
@@ -11937,7 +11936,7 @@ func TestNodeExpandVolume(t *testing.T) {
1193711936
},
1193811937
getDeviceClient: func() devices.Devices {
1193911938
mockDeviceClient := mock_devices.NewMockDevices(gomock.NewController(t))
11940-
mockDeviceClient.EXPECT().GetLUKSDevicePathForVolume(gomock.Any(), gomock.Any()).Return("", errors.New(""))
11939+
mockDeviceClient.EXPECT().GetLUKSDeviceForMultipathDevice(gomock.Any()).Return("", errors.New(""))
1194111940
return mockDeviceClient
1194211941
},
1194311942
expErrCode: codes.Internal,
@@ -11985,9 +11984,7 @@ func TestNodeExpandVolume(t *testing.T) {
1198511984
},
1198611985
getDeviceClient: func() devices.Devices {
1198711986
mockDeviceClient := mock_devices.NewMockDevices(gomock.NewController(t))
11988-
mockDeviceClient.EXPECT().GetLUKSDevicePathForVolume(
11989-
gomock.Any(), gomock.Any(),
11990-
).Return("x/device-path", nil).AnyTimes()
11987+
mockDeviceClient.EXPECT().GetLUKSDeviceForMultipathDevice(gomock.Any()).Return("x/device-path", nil).AnyTimes()
1199111988
return mockDeviceClient
1199211989
},
1199311990
expErrCode: codes.InvalidArgument,
@@ -12035,9 +12032,7 @@ func TestNodeExpandVolume(t *testing.T) {
1203512032
},
1203612033
getDeviceClient: func() devices.Devices {
1203712034
mockDeviceClient := mock_devices.NewMockDevices(gomock.NewController(t))
12038-
mockDeviceClient.EXPECT().GetLUKSDevicePathForVolume(
12039-
gomock.Any(), gomock.Any(),
12040-
).Return("x/device-path", nil).AnyTimes()
12035+
mockDeviceClient.EXPECT().GetLUKSDeviceForMultipathDevice(gomock.Any()).Return("x/device-path", nil).AnyTimes()
1204112036
return mockDeviceClient
1204212037
},
1204312038
expErrCode: codes.InvalidArgument,
@@ -12085,9 +12080,7 @@ func TestNodeExpandVolume(t *testing.T) {
1208512080
},
1208612081
getDeviceClient: func() devices.Devices {
1208712082
mockDeviceClient := mock_devices.NewMockDevices(gomock.NewController(t))
12088-
mockDeviceClient.EXPECT().GetLUKSDevicePathForVolume(
12089-
gomock.Any(), gomock.Any(),
12090-
).Return("x/device-path", nil).AnyTimes()
12083+
mockDeviceClient.EXPECT().GetLUKSDeviceForMultipathDevice(gomock.Any()).Return("x/device-path", nil).AnyTimes()
1209112084
return mockDeviceClient
1209212085
},
1209312086
expErrCode: codes.Internal,
@@ -12530,9 +12523,7 @@ func TestNodeUnstageFCPVolume(t *testing.T) {
1253012523
mockDeviceClient := mock_devices.NewMockDevices(gomock.NewController(t))
1253112524
mockDeviceClient.EXPECT().RemoveMultipathDeviceMappingWithRetries(gomock.Any(), gomock.Any(),
1253212525
gomock.Any(), gomock.Any()).Return(errors.New("")).AnyTimes()
12533-
mockDeviceClient.EXPECT().GetLUKSDevicePathForVolume(
12534-
gomock.Any(), gomock.Any(),
12535-
).Return("", errors.New("")).AnyTimes()
12526+
mockDeviceClient.EXPECT().GetLUKSDeviceForMultipathDevice(gomock.Any()).Return("", errors.New("")).AnyTimes()
1253612527
mockDeviceClient.EXPECT().EnsureLUKSDeviceClosedWithMaxWaitLimit(gomock.Any(), gomock.Any()).Return(errors.New("")).AnyTimes()
1253712528
return mockDeviceClient
1253812529
},
@@ -12719,9 +12710,7 @@ func TestNodeUnstageFCPVolume(t *testing.T) {
1271912710
},
1272012711
getDeviceClient: func() devices.Devices {
1272112712
mockDeviceClient := mock_devices.NewMockDevices(gomock.NewController(t))
12722-
mockDeviceClient.EXPECT().GetLUKSDevicePathForVolume(
12723-
gomock.Any(), gomock.Any(),
12724-
).Return("", errors.New("")).AnyTimes()
12713+
mockDeviceClient.EXPECT().GetLUKSDeviceForMultipathDevice(gomock.Any()).Return("", errors.New("")).AnyTimes()
1272512714
// mockDeviceClient.EXPECT().RemoveMultipathDeviceMappingWithRetries(gomock.Any(), gomock.Any(),
1272612715
// gomock.Any(), gomock.Any()).Return(nil).AnyTimes()
1272712716
// mockDeviceClient.EXPECT().EnsureLUKSDeviceClosedWithMaxWaitLimit(gomock.Any(), gomock.Any()).Return(nil).AnyTimes()
@@ -12769,9 +12758,7 @@ func TestNodeUnstageFCPVolume(t *testing.T) {
1276912758
},
1277012759
getDeviceClient: func() devices.Devices {
1277112760
mockDeviceClient := mock_devices.NewMockDevices(gomock.NewController(t))
12772-
mockDeviceClient.EXPECT().GetLUKSDevicePathForVolume(
12773-
gomock.Any(), gomock.Any(),
12774-
).Return("multipath-device", nil).AnyTimes()
12761+
mockDeviceClient.EXPECT().GetLUKSDeviceForMultipathDevice(gomock.Any()).Return("multipath-device", nil).AnyTimes()
1277512762
// mockDeviceClient.EXPECT().RemoveMultipathDeviceMappingWithRetries(gomock.Any(), gomock.Any(),
1277612763
// gomock.Any(), gomock.Any()).Return(nil).AnyTimes()
1277712764
mockDeviceClient.EXPECT().EnsureLUKSDeviceClosedWithMaxWaitLimit(gomock.Any(), gomock.Any()).Return(errors.New("")).AnyTimes()
@@ -12820,9 +12807,7 @@ func TestNodeUnstageFCPVolume(t *testing.T) {
1282012807
},
1282112808
getDeviceClient: func() devices.Devices {
1282212809
mockDeviceClient := mock_devices.NewMockDevices(gomock.NewController(t))
12823-
mockDeviceClient.EXPECT().GetLUKSDevicePathForVolume(
12824-
gomock.Any(), gomock.Any(),
12825-
).Return("multipath-device", nil).AnyTimes()
12810+
mockDeviceClient.EXPECT().GetLUKSDeviceForMultipathDevice(gomock.Any()).Return("multipath-device", nil).AnyTimes()
1282612811
// mockDeviceClient.EXPECT().RemoveMultipathDeviceMappingWithRetries(gomock.Any(), gomock.Any(),
1282712812
// gomock.Any(), gomock.Any()).Return(nil).AnyTimes()
1282812813
mockDeviceClient.EXPECT().EnsureLUKSDeviceClosedWithMaxWaitLimit(gomock.Any(), gomock.Any()).Return(errors.MaxWaitExceededError("")).AnyTimes()
@@ -12870,9 +12855,7 @@ func TestNodeUnstageFCPVolume(t *testing.T) {
1287012855
},
1287112856
getDeviceClient: func() devices.Devices {
1287212857
mockDeviceClient := mock_devices.NewMockDevices(gomock.NewController(t))
12873-
mockDeviceClient.EXPECT().GetLUKSDevicePathForVolume(
12874-
gomock.Any(), gomock.Any(),
12875-
).Return("multipath-device", nil).AnyTimes()
12858+
mockDeviceClient.EXPECT().GetLUKSDeviceForMultipathDevice(gomock.Any()).Return("multipath-device", nil).AnyTimes()
1287612859
// mockDeviceClient.EXPECT().RemoveMultipathDeviceMappingWithRetries(gomock.Any(), gomock.Any(),
1287712860
// gomock.Any(), gomock.Any()).Return(nil).AnyTimes()
1287812861
mockDeviceClient.EXPECT().EnsureLUKSDeviceClosedWithMaxWaitLimit(gomock.Any(), gomock.Any()).Return(errors.MaxWaitExceededError("")).AnyTimes()
@@ -12920,9 +12903,7 @@ func TestNodeUnstageFCPVolume(t *testing.T) {
1292012903
},
1292112904
getDeviceClient: func() devices.Devices {
1292212905
mockDeviceClient := mock_devices.NewMockDevices(gomock.NewController(t))
12923-
mockDeviceClient.EXPECT().GetLUKSDevicePathForVolume(
12924-
gomock.Any(), gomock.Any(),
12925-
).Return("multipath-device", nil).AnyTimes()
12906+
mockDeviceClient.EXPECT().GetLUKSDeviceForMultipathDevice(gomock.Any()).Return("multipath-device", nil).AnyTimes()
1292612907
mockDeviceClient.EXPECT().RemoveMultipathDeviceMappingWithRetries(gomock.Any(), gomock.Any(),
1292712908
gomock.Any(), gomock.Any()).Return(errors.New("")).AnyTimes()
1292812909
mockDeviceClient.EXPECT().EnsureLUKSDeviceClosedWithMaxWaitLimit(gomock.Any(), gomock.Any()).Return(errors.MaxWaitExceededError("")).AnyTimes()
@@ -12971,9 +12952,7 @@ func TestNodeUnstageFCPVolume(t *testing.T) {
1297112952
},
1297212953
getDeviceClient: func() devices.Devices {
1297312954
mockDeviceClient := mock_devices.NewMockDevices(gomock.NewController(t))
12974-
mockDeviceClient.EXPECT().GetLUKSDevicePathForVolume(
12975-
gomock.Any(), gomock.Any(),
12976-
).Return("multipath-device", nil).AnyTimes()
12955+
mockDeviceClient.EXPECT().GetLUKSDeviceForMultipathDevice(gomock.Any()).Return("multipath-device", nil).AnyTimes()
1297712956
mockDeviceClient.EXPECT().RemoveMultipathDeviceMappingWithRetries(gomock.Any(), gomock.Any(),
1297812957
gomock.Any(), gomock.Any()).Return(nil).AnyTimes()
1297912958
mockDeviceClient.EXPECT().EnsureLUKSDeviceClosed(gomock.Any(), gomock.Any()).Return(nil).AnyTimes()

0 commit comments

Comments
 (0)