bug 7245: don't try to set vm name for detached volume during expunge process.

status 7245: resolved fixed

Fixed couple of other problems:
* cleanup corresponding records in load_balancer_vm_map table when loadBalancerRule is removed.
* don't log "java.lang.IllegalStateException: getAttribute: Session already invalidated" exception when UI session expires
This commit is contained in:
alena 2010-11-19 20:08:18 -08:00
parent f6836b2cb9
commit 138e0914b6
3 changed files with 16 additions and 5 deletions

View File

@ -327,8 +327,10 @@ public class ApiServlet extends HttpServlet {
if (s_logger.isTraceEnabled()) {
s_logger.trace("exception writing response: " + ioex);
}
} catch (Exception ex) {
s_logger.error("unknown exception writing api response", ex);
} catch (Exception ex) {
if (!(ex instanceof IllegalStateException)) {
s_logger.error("unknown exception writing api response", ex);
}
}
}

View File

@ -2273,8 +2273,13 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
}
// remove all loadBalancer->VM mappings
_loadBalancerVMMapDao.remove(loadBalancerId);
List<LoadBalancerVMMapVO> lbVmMap = _loadBalancerVMMapDao.listByLoadBalancerId(loadBalancerId);
if (lbVmMap != null && !lbVmMap.isEmpty()) {
for (LoadBalancerVMMapVO lb : lbVmMap) {
_loadBalancerVMMapDao.remove(lb.getId());
}
}
// Save and create the event
String description;
String type = EventTypes.EVENT_NET_RULE_DELETE;

View File

@ -1032,7 +1032,11 @@ public class StorageManagerImpl implements StorageManager {
if (poolId != null && volumePath != null && !volumePath.trim().isEmpty()) {
Answer answer = null;
StoragePoolVO pool = _storagePoolDao.findById(poolId);
final DestroyCommand cmd = new DestroyCommand(pool, vol, vm.getInstanceName());
String vmName = null;
if (vm != null) {
vmName = vm.getInstanceName();
}
final DestroyCommand cmd = new DestroyCommand(pool, vol, vmName);
boolean removed = false;
List<StoragePoolHostVO> poolhosts = _storagePoolHostDao.listByPoolId(poolId);
for (StoragePoolHostVO poolhost : poolhosts) {