Skip to content

Commit 5e442df

Browse files
ssvm: continue with other secondary storages if fails to program a secondary storage (#7264)
This PR fixes #7244
1 parent e613b90 commit 5e442df

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

services/secondary-storage/controller/src/main/java/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ SecondaryStorageVmVO getSSVMfromHost(HostVO ssAHost) {
299299
public boolean generateSetupCommand(Long ssHostId) {
300300
HostVO cssHost = _hostDao.findById(ssHostId);
301301
Long zoneId = cssHost.getDataCenterId();
302+
boolean result = true;
302303
if (cssHost.getType() == Host.Type.SecondaryStorageVM) {
303304
String hostName = cssHost.getName();
304305

@@ -340,12 +341,12 @@ public boolean generateSetupCommand(Long ssHostId) {
340341
s_logger.debug(String.format("Successfully programmed secondary storage [%s] in secondary storage VM [%s].", ssStore.getName(), secStorageVm.getInstanceName()));
341342
} else {
342343
s_logger.debug(String.format("Unable to program secondary storage [%s] in secondary storage VM [%s] due to [%s].", ssStore.getName(), secStorageVm.getInstanceName(), answer == null ? "null answer" : answer.getDetails()));
343-
return false;
344+
result = false;
344345
}
345346
}
346347
}
347348

348-
return true;
349+
return result;
349350
}
350351

351352
@Override

0 commit comments

Comments
 (0)