{"action":"closed","issue":{"url":"https://api.github.com/repos/zstackorg/zstack/issues/13","labels_url":"https://api.github.com/repos/zstackorg/zstack/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/zstackorg/zstack/issues/13/comments","events_url":"https://api.github.com/repos/zstackorg/zstack/issues/13/events","html_url":"https://github.com/zstackorg/zstack/issues/13","id":71017021,"number":13,"title":" NPE when allocating host capacity if hosts are in status of connecting","user":{"login":"zstackorg","id":11801061,"avatar_url":"https://avatars.githubusercontent.com/u/11801061?v=3","gravatar_id":"","url":"https://api.github.com/users/zstackorg","html_url":"https://github.com/zstackorg","followers_url":"https://api.github.com/users/zstackorg/followers","following_url":"https://api.github.com/users/zstackorg/following{/other_user}","gists_url":"https://api.github.com/users/zstackorg/gists{/gist_id}","starred_url":"https://api.github.com/users/zstackorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zstackorg/subscriptions","organizations_url":"https://api.github.com/users/zstackorg/orgs","repos_url":"https://api.github.com/users/zstackorg/repos","events_url":"https://api.github.com/users/zstackorg/events{/privacy}","received_events_url":"https://api.github.com/users/zstackorg/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/zstackorg/zstack/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-26T06:13:31Z","updated_at":"2015-04-28T21:46:35Z","closed_at":"2015-04-28T21:46:35Z","body":"\r\n2015-04-24 00:24:46,305 DEBUG [HostAllocatorChain] (zs-thread-19) [Host Allocation]: flow[org.zstack.compute.allocator.AttachedL2NetworkAllocatorFlow] successfully found 2 candidate hosts for vm[uuid:86c683c84ebe4f0f9a310ec86a001523, name:test_vm_default_name]\r\n2015-04-24 00:24:46,306 WARN  [HostAllocatorChain] (zs-thread-19) unhandled throwable\r\njava.lang.NullPointerException\r\n    at org.zstack.compute.allocator.HostCapacityAllocatorFlow.allocate(HostCapacityAllocatorFlow.java:43) ~[compute-0.6.0.jar:?]\r\n    at org.zstack.compute.allocator.HostCapacityAllocatorFlow.allocate(HostCapacityAllocatorFlow.java:56) ~[compute-0.6.0.jar:?]\r\n    at org.zstack.compute.allocator.HostAllocatorChain.runFlow(HostAllocatorChain.java:172) [compute-0.6.0.jar:?]\r\n    at org.zstack.compute.allocator.HostAllocatorChain.next(HostAllocatorChain.java:226) [compute-0.6.0.jar:?]\r\n    at org.zstack.header.allocator.AbstractHostAllocatorFlow.next(AbstractHostAllocatorFlow.java:56) [header-0.6.0.jar:?]\r\n    at org.zstack.compute.allocator.AttachedL2NetworkAllocatorFlow.allocate(AttachedL2NetworkAllocatorFlow.java:113) [compute-0.6.0.jar:?]\r\n    at org.zstack.compute.allocator.HostAllocatorChain.runFlow(HostAllocatorChain.java:172) [compute-0.6.0.jar:?]\r\n    at org.zstack.compute.allocator.HostAllocatorChain.start(HostAllocatorChain.java:195) [compute-0.6.0.jar:?]\r\n    at org.zstack.compute.allocator.HostAllocatorChain.allocate_aroundBody2(HostAllocatorChain.java:201) [compute-0.6.0.jar:?]\r\n    at org.zstack.compute.allocator.HostAllocatorChain$AjcClosure3.run(HostAllocatorChain.java:1) [compute-0.6.0.jar:?]\r\n    at org.zstack.core.aspect.AsyncSafeAspect.ajc$around$org_zstack_core_aspect_AsyncSafeAspect$1$c4af5facproceed(AsyncSafeAspect.aj:1) [core-0.6.0.jar:?]\r\n    at org.zstack.core.aspect.AsyncSafeAspect.ajc$around$org_zstack_core_aspect_AsyncSafeAspect$1$c4af5fac(AsyncSafeAspect.aj:84) [core-0.6.0.jar:?]\r\n    at org.zstack.compute.allocator.HostAllocatorChain.allocate(HostAllocatorChain.java:198) [compute-0.6.0.jar:?]\r\n    at org.zstack.compute.allocator.HostAllocatorChain.allocate_aroundBody6(HostAllocatorChain.java:254) [compute-0.6.0.jar:?]\r\n    at org.zstack.compute.allocator.HostAllocatorChain$AjcClosure7.run(HostAllocatorChain.java:1) [compute-0.6.0.jar:?]\r\n    at org.zstack.core.aspect.AsyncSafeAspect.ajc$around$org_zstack_core_aspect_AsyncSafeAspect$1$c4af5facproceed(AsyncSafeAspect.aj:1) [core-0.6.0.jar:?]\r\n    at org.zstack.core.aspect.AsyncSafeAspect.ajc$around$org_zstack_core_aspect_AsyncSafeAspect$1$c4af5fac(AsyncSafeAspect.aj:84) [core-0.6.0.jar:?]\r\n    at org.zstack.compute.allocator.HostAllocatorChain.allocate(HostAllocatorChain.java:252) [compute-0.6.0.jar:?]\r\n    at org.zstack.compute.allocator.HostAllocatorManagerImpl.handle(HostAllocatorManagerImpl.java:118) [compute-0.6.0.jar:?]\r\n    at org.zstack.compute.allocator.HostAllocatorManagerImpl.handleLocalMessage(HostAllocatorManagerImpl.java:57) [compute-0.6.0.jar:?]\r\n    at org.zstack.compute.allocator.HostAllocatorManagerImpl.handleMessage(HostAllocatorManagerImpl.java:51) [compute-0.6.0.jar:?]\r\n    at org.zstack.core.cloudbus.CloudBusImpl2$11$1$1.call(CloudBusImpl2.java:1818) [core-0.6.0.jar:?]\r\n    at org.zstack.core.cloudbus.CloudBusImpl2$11$1$1.call(CloudBusImpl2.java:1) [core-0.6.0.jar:?]\r\n    at org.zstack.core.thread.ThreadFacadeImpl$Worker.call(ThreadFacadeImpl.java:111) [core-0.6.0.jar:?]\r\n    at java.util.concurrent.FutureTask.run(FutureTask.java:262) [?:1.7.0_75]\r\n    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [?:1.7.0_75]\r\n    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [?:1.7.0_75]\r\n    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_75]\r\n    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_75]\r\n    at java.lang.Thread.run(Thread.java:745) [?:1.7.0_75]\r\n"}}