Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,20 @@ protected boolean onFailure(Throwable t) {

private <T extends XInfiniResponse> void retryUtilResourceDeleted(XInfiniRequest req,
Class<T> rsp) {
retryUtilResourceDeleted(req, rsp, 150, 2);
}

private <T extends XInfiniResponse> void retryUtilResourceDeleted(XInfiniRequest req,
Class<T> rsp,
int retryTimes,
int retryInterval) {
new Retry<Void>() {
{
times = retryTimes;
interval = retryInterval;
}

@Override
@RetryCondition(times = 150, interval = 2)
protected Void call() {
T r = XInfiniApiHelper.this.call(req, rsp);
if (!r.resourceIsDeleted()) {
Expand Down Expand Up @@ -731,7 +742,10 @@ public void deleteVolumeClientGroupMapping(int mapId) {

GetVolumeClientGroupMappingRequest gReq = new GetVolumeClientGroupMappingRequest();
gReq.setId(mapId);
retryUtilResourceDeleted(gReq, GetVolumeClientGroupMappingResponse.class);
// the storage tears mappings down asynchronously path by path and cannot be
// operated on while deleting; observed taking over 30 minutes, so wait long
// enough to cover the teardown window
retryUtilResourceDeleted(gReq, GetVolumeClientGroupMappingResponse.class, 1800, 2);
}

public List<IscsiGatewayClientGroupMappingModule> queryIscsiGatewayClientGroupMappingByGroupId(int groupId) {
Expand Down