ssvm: continue with other secondary storages if fails to program a secondary storage (#7264)

This PR fixes #7244
This commit is contained in:
Wei Zhou 2023-05-11 09:27:51 +02:00 committed by GitHub
parent e613b90fee
commit 5e442df5a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -299,6 +299,7 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements Secondar
public boolean generateSetupCommand(Long ssHostId) {
HostVO cssHost = _hostDao.findById(ssHostId);
Long zoneId = cssHost.getDataCenterId();
boolean result = true;
if (cssHost.getType() == Host.Type.SecondaryStorageVM) {
String hostName = cssHost.getName();
@ -340,12 +341,12 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements Secondar
s_logger.debug(String.format("Successfully programmed secondary storage [%s] in secondary storage VM [%s].", ssStore.getName(), secStorageVm.getInstanceName()));
} else {
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()));
return false;
result = false;
}
}
}
return true;
return result;
}
@Override