cloudstack 的坑
作者:英雄无敌 日期:2019-12-30
最近一客户单位要启用16年的备用环境,cloudstack正常启动后,kvm虚拟机启动了两台,发现应用收到影响,于是将虚拟机关闭,等到再次启动虚拟机时发现,启动失败。控制台给出的错误是"Unable to start a VM due to insufficient capacity"。一下子懵逼了,这cloudstack是个老古董啊,梁胜早就干别的去了,现在流行容器化,这cloudstack也没人管了,以前我也没整过这个啊。只好求助baidu和Google,一轮搜索下来发现"Unable to start a VM due to insufficient capacity",这个错误是个表象,开启cloudstackmanagement日志的trace级别,和agent的trace基本日志,发现每次启动都是这个错误第一个出现。
2019-12-27 09:29:15,224 INFO [c.c.v.VirtualMachineManagerImpl] (Work-Job-Executor-5:ctx-8cac4657 job-119455/job-119456 ctx-84437abc) (logid:ede314d7) Unable to contact resource.
com.cloud.exception.ResourceUnavailableException: Resource [Pod:1] is unreachable: Unable to apply userdata and password entry on router
at org.apache.cloudstack.network.topology.BasicNetworkTopology.applyRules(BasicNetworkTopology.java:397)
at org.apache.cloudstack.network.topology.BasicNetworkTopology.applyUserData(BasicNetworkTopology.java:185)
at com.cloud.network.element.VirtualRouterElement.addPasswordAndUserdata(VirtualRouterElement.java:1015)
at org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.prepareElement(NetworkOrchestrator.java:1266)
at org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.prepareNic(NetworkOrchestrator.java:1385)
at org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.prepare(NetworkOrchestrator.java:1321)
at com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:996)
at com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:4580)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
at com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:4741)
at com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:102)
"nable to apply userdata and password entry on router",搜索这个错误,有很多说法,其中有人说把虚拟路由删除,再重设置一个就好了,这是粗处理,再搜索,找到这篇文章。“cloudstack 虚拟路由之痛”
https://selfsigned.wordpress.com/2014/06/27/cloudstack-virtual-router-pains/
作为虚拟路由的deban系统内/var/log日志占满了磁盘,导致这个问题,进入VR的控制台删除日志就好了。这坑埋得太深了。
2019-12-27 09:29:15,224 INFO [c.c.v.VirtualMachineManagerImpl] (Work-Job-Executor-5:ctx-8cac4657 job-119455/job-119456 ctx-84437abc) (logid:ede314d7) Unable to contact resource.
com.cloud.exception.ResourceUnavailableException: Resource [Pod:1] is unreachable: Unable to apply userdata and password entry on router
at org.apache.cloudstack.network.topology.BasicNetworkTopology.applyRules(BasicNetworkTopology.java:397)
at org.apache.cloudstack.network.topology.BasicNetworkTopology.applyUserData(BasicNetworkTopology.java:185)
at com.cloud.network.element.VirtualRouterElement.addPasswordAndUserdata(VirtualRouterElement.java:1015)
at org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.prepareElement(NetworkOrchestrator.java:1266)
at org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.prepareNic(NetworkOrchestrator.java:1385)
at org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.prepare(NetworkOrchestrator.java:1321)
at com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:996)
at com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:4580)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
at com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:4741)
at com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:102)
"nable to apply userdata and password entry on router",搜索这个错误,有很多说法,其中有人说把虚拟路由删除,再重设置一个就好了,这是粗处理,再搜索,找到这篇文章。“cloudstack 虚拟路由之痛”
https://selfsigned.wordpress.com/2014/06/27/cloudstack-virtual-router-pains/
作为虚拟路由的deban系统内/var/log日志占满了磁盘,导致这个问题,进入VR的控制台删除日志就好了。这坑埋得太深了。
评论: 1 | 引用: 0 | 查看次数: 184182
发表评论
感谢楼主,要是帖子晚发几天,那这个问题就不知道什么时候才能解决了。。。