我们正在调用API以在非工作时段取消部署vApp,然后再将其重新启动。
尝试取消部署VApp时出现间歇性错误。 (我稍后会给出完整的堆栈跟踪)。
只是为了让你知道我在做什么,是我首先调用VApp.shutdown(),它似乎总是会返回成功。在调用Vapp.undeploy(UndeployPowerActionType.DEFAULT)调用之前,我有时会等待最多10分钟。它往往不起作用。当我再次运行时,它经常工作(当我检查结果时,Vapp确实取消部署),或者如果它仍然无法工作,那么当我再次调用它时,它确实有效。 / p>
堆栈跟踪如下所示..(有时数组索引超出了不同数字的范围,例如-5或-12等等。堆栈跟踪总是如下所示......)
2014-07-17 13:10:33错误[main] ControlModule:75 - 取消部署导致错误 java.lang.ArrayIndexOutOfBoundsException:数组索引超出范围:-2 at com.sun.xml.bind.v2.util.CollisionCheckStack.findDuplicate(CollisionCheckStack.java:133) 在com.sun.xml.bind.v2.util.CollisionCheckStack.push(CollisionCheckStack.java:71) 在com.sun.xml.bind.v2.runtime.XMLSerializer.pushObject(XMLSerializer.java:494) at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:609) at com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.serializeBody(SingleElementNodeProperty.java:113) at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl $ 1.serializeBody(ElementBeanInfoImpl.java:120) at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl $ 1.serializeBody(ElementBeanInfoImpl.java:149) at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(ElementBeanInfoImpl.java:269) at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:276) at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:35) at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:472) at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:301) 在com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:230) 在javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:106) 在com.vmware.vcloud.sdk.JAXBUtil.marshal(JAXBUtil.java:199) 在com.vmware.vcloud.sdk.AbstractVapp.createVappUnDeployParamBody(AbstractVapp.java:299) 在com.vmware.vcloud.sdk.AbstractVapp.undeploy(AbstractVapp.java:318) 在com.ipt.ebsa.skyscape.client.module.ControlModule.controlVApp(ControlModule.java:70) 在com.ipt.ebsa.skyscape.client.manager.VMManager.controlVApp(VMManager.java:294) 在com.ipt.ebsa.skyscape.client.CloudManager.UndeployVApp(CloudManager.java:197) 在com.ipt.ebsa.skyscape.client.RajVAppTest.stopAndUndeployVApp(RajVAppTest.java:178) 在com.ipt.ebsa.skyscape.client.RajVAppTest.testUndeployVApp0(RajVAppTest.java:121) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:94) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) 在java.lang.reflect.Method.invoke(Method.java:619) 在org.junit.runners.model.FrameworkMethod $ 1.runReflectiveCall(FrameworkMethod.java:47) 在org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) 在org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) 在org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) 在org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) 在org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) 在org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) 在org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) 在org.junit.runners.ParentRunner $ 3.run(ParentRunner.java:238) 在org.junit.runners.ParentRunner $ 1.schedule(ParentRunner.java:63) 在org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) 在org.junit.runners.ParentRunner.access $ 000(ParentRunner.java:53) 在org.junit.runners.ParentRunner $ 2.evaluate(ParentRunner.java:229) 在org.junit.runners.ParentRunner.run(ParentRunner.java:309) 在org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) 在org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) 在org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) 在org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) 在org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) 在org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) 2014-07-17 13:10:33 DEBUG [main] ControlModule:77 - 取消部署vapp' TEST_RAJ2'完成 2014-07-17 13:10:33 DEBUG [main] VMManager:296 - controlVApp退出
有人可以告诉我,如果我做错了吗?通常的做法是只需要重试,最终它会工作,以便取消部署我的Vapp。
如果是这种情况,并且我必须继续重试,我可以检测到这个异常,如果我得到它,请在最终失败并放弃之前重新安装一定次数?
或者是否有其他方法可以检测Vapp是否已取消部署?
调用' shutdown()而不是undeploy()会更好吗?我认为,根据我的经验,这似乎更加一致。但是,控制台中生成的vApp标题为“部分运行”'而不是'关闭'。这可能是可以接受的,因为在一天结束时,我们只是希望我们的云托管合作伙伴在我们不需要vAPP时停止向我们收费。我认为关闭vAPP可能实际上达到了这个目的吗?我必须检查云托管合作伙伴。
非常感谢任何帮助。
谢谢,