mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
bug 10618: fixed NPE
status 10618: resolved fixed
This commit is contained in:
parent
9f13b46d61
commit
9b640085ab
@ -267,16 +267,17 @@ public class StatsCollector {
|
||||
}
|
||||
|
||||
List<HostVO> hosts = _hostDao.listSecondaryStorageHosts();
|
||||
ConcurrentHashMap<Long, StorageStats> storageStats = new ConcurrentHashMap<Long, StorageStats>();
|
||||
|
||||
for (HostVO host : hosts) {
|
||||
ConcurrentHashMap<Long, StorageStats> storageStats = new ConcurrentHashMap<Long, StorageStats>();
|
||||
for (HostVO host : hosts) {
|
||||
if ( host.getStorageUrl() == null ) {
|
||||
continue;
|
||||
}
|
||||
GetStorageStatsCommand command = new GetStorageStatsCommand(host.getStorageUrl());
|
||||
HostVO ssAhost = _agentMgr.getSSAgent(host);
|
||||
if( ssAhost == null ) {
|
||||
s_logger.warn("There is no secondary storage VM for secondary storage host " + host.getName());
|
||||
continue;
|
||||
}
|
||||
|
||||
HostVO ssAhost = _agentMgr.getSSAgent(host);
|
||||
if (ssAhost == null) {
|
||||
s_logger.warn("There is no secondary storage VM for secondary storage host " + host.getName());
|
||||
continue;
|
||||
}
|
||||
long hostId = host.getId();
|
||||
Answer answer = _agentMgr.easySend(ssAhost.getId(), command);
|
||||
if (answer != null && answer.getResult()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user