mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Use parameter dcId as wrapper to prevent NPE (#8986)
This commit is contained in:
parent
aad410ae6c
commit
e520525fe7
@ -47,5 +47,5 @@ public interface EndPointSelector {
|
|||||||
|
|
||||||
EndPoint select(DataStore store, String downloadUrl);
|
EndPoint select(DataStore store, String downloadUrl);
|
||||||
|
|
||||||
EndPoint findSsvm(long dcId);
|
EndPoint findSsvm(Long dcId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -338,7 +338,8 @@ public class DefaultEndPointSelector implements EndPointSelector {
|
|||||||
* Finds an SSVM that can be used to execute a command.
|
* Finds an SSVM that can be used to execute a command.
|
||||||
* For zone-wide image store, use SSVM for that zone. For region-wide store, we can arbitrarily pick one SSVM to do the task.
|
* For zone-wide image store, use SSVM for that zone. For region-wide store, we can arbitrarily pick one SSVM to do the task.
|
||||||
* */
|
* */
|
||||||
public EndPoint findSsvm(long dcId) {
|
@Override
|
||||||
|
public EndPoint findSsvm(Long dcId) {
|
||||||
List<HostVO> ssAHosts = listUpAndConnectingSecondaryStorageVmHost(dcId);
|
List<HostVO> ssAHosts = listUpAndConnectingSecondaryStorageVmHost(dcId);
|
||||||
if (ssAHosts == null || ssAHosts.isEmpty()) {
|
if (ssAHosts == null || ssAHosts.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user