mirror of https://github.com/apache/cloudstack.git
CS-16330 VM deployment not working and Exception on SSVM
status CS-16330: resolved fixed reviewed-by: Kelven
This commit is contained in:
parent
ec0c35269a
commit
97e043c65e
|
|
@ -5,6 +5,7 @@
|
|||
package com.cloud.storage.resource;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
import com.cloud.hypervisor.vmware.util.VmwareContext;
|
||||
|
|
@ -48,10 +49,11 @@ public class VmwareSecondaryStorageContextFactory {
|
|||
|
||||
public static void invalidate(VmwareContext context) {
|
||||
synchronized(s_contextMap) {
|
||||
for(Map.Entry<String, VmwareContext> entry : s_contextMap.entrySet()) {
|
||||
if(entry.getValue() == context) {
|
||||
s_contextMap.remove(entry.getKey());
|
||||
}
|
||||
for(Iterator<Map.Entry<String, VmwareContext>> entryIter = s_contextMap.entrySet().iterator(); entryIter.hasNext();) {
|
||||
Map.Entry<String, VmwareContext> entry = entryIter.next();
|
||||
if(entry.getValue() == context) {
|
||||
entryIter.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue