Skip to content

Commit 32e1e94

Browse files
author
gitlab
committed
Merge branch 'fix/ZSTAC-80595' into '5.5.12'
<fix>[zbs]: reduce mds connect timeout and enable tryNext for volume clients See merge request zstackio/zstack!9153
2 parents 461e8a2 + 3b5bda3 commit 32e1e94

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

plugin/zbs/src/main/java/org/zstack/storage/zbs/ZbsStorageController.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,10 @@ public List<ActiveVolumeClient> getActiveClients(String installPath, String prot
179179
if (VolumeProtocol.CBD.toString().equals(protocol)) {
180180
GetVolumeClientsCmd cmd = new GetVolumeClientsCmd();
181181
cmd.setPath(installPath);
182-
GetVolumeClientsRsp rsp = syncHttpCall(GET_VOLUME_CLIENTS_PATH, cmd, GetVolumeClientsRsp.class);
182+
GetVolumeClientsRsp rsp = new HttpCaller<>(GET_VOLUME_CLIENTS_PATH, cmd, GetVolumeClientsRsp.class,
183+
null, TimeUnit.SECONDS, 30, true)
184+
.setTryNext(true)
185+
.syncCall();
183186
List<ActiveVolumeClient> clients = new ArrayList<>();
184187

185188
if (!rsp.isSuccess()) {
@@ -1411,6 +1414,11 @@ public class HttpCaller<T extends AgentResponse> {
14111414

14121415
private boolean tryNext = false;
14131416

1417+
HttpCaller<T> setTryNext(boolean tryNext) {
1418+
this.tryNext = tryNext;
1419+
return this;
1420+
}
1421+
14141422
public HttpCaller(String path, AgentCommand cmd, Class<T> retClass, ReturnValueCompletion<T> callback) {
14151423
this(path, cmd, retClass, callback, null, 0, false);
14161424
}

0 commit comments

Comments
 (0)