Delete and recreate the last /instance entity in a running BeWan Application
Step 1:
Running BeWan Application
GET http://131.254.13.194:9000/api/virtualMachine
[{"remoteId":"30260ebc-d106-4ade-8441-559bf212428a/e92bb306-72cd-33a2-a952-908db2f47e98/591e99e8-1719-3b5d-a40a-0fce14a20850","cloudProviderId":"e92bb306-72cd-33a2-a952-908db2f47e98/591e99e8-1719-3b5d-a40a-0fce14a20850","remoteState":"OK","name":"MediumComputeLowStorageUbuntuVMInstance_4","cloud":1,"image":158,"hardware":4,"location":3,"templateOptions":null,"link":[{"href":"http://131.254.13.194:9000/api/virtualMachine/65536","rel":"self"}]},{"remoteId":"30260ebc-d106-4ade-8441-559bf212428a/e92bb306-72cd-33a2-a952-908db2f47e98/d4879117-ddc3-38a7-bd33-1643dd229ea1","cloudProviderId":"e92bb306-72cd-33a2-a952-908db2f47e98/d4879117-ddc3-38a7-bd33-1643dd229ea1","remoteState":"OK","name":"MediumComputeMediumStorageUbuntuVMInstance_9","cloud":1,"image":158,"hardware":4,"location":3,"templateOptions":null,"link":[{"href":"http://131.254.13.194:9000/api/virtualMachine/65540","rel":"self"}]},{"remoteId":"30260ebc-d106-4ade-8441-559bf212428a/e92bb306-72cd-33a2-a952-908db2f47e98/17591050-ff66-3bb2-acd4-2b0afbfa4aca","cloudProviderId":"e92bb306-72cd-33a2-a952-908db2f47e98/17591050-ff66-3bb2-acd4-2b0afbfa4aca","remoteState":"OK","name":"MediumComputeLowStorageUbuntuVMInstance_15","cloud":1,"image":158,"hardware":4,"location":3,"templateOptions":null,"link":[{"href":"http://131.254.13.194:9000/api/virtualMachine/65541","rel":"self"}]}]
GET http://131.254.13.194:9000/api/instance
[{"remoteId":null,"cloudProviderId":null,"remoteState":"OK","applicationComponent":1,"applicationInstance":1,"virtualMachine":65540,"link":[{"href":"http://131.254.13.194:9000/api/instance/65542","rel":"self"}]},{"remoteId":null,"cloudProviderId":null,"remoteState":"OK","applicationComponent":2,"applicationInstance":1,"virtualMachine":65536,"link":[{"href":"http://131.254.13.194:9000/api/instance/65543","rel":"self"}]},{"remoteId":null,"cloudProviderId":null,"remoteState":"OK","applicationComponent":3,"applicationInstance":1,"virtualMachine":65541,"link":[{"href":"http://131.254.13.194:9000/api/instance/65544","rel":"self"}]}]
========== STEP 2:
DELETE 131.254.13.194:9000/api/instance/65544
200 OK
GET http://131.254.13.194:9000/api/instance
[{"remoteId":null,"cloudProviderId":null,"remoteState":"OK","applicationComponent":1,"applicationInstance":1,"virtualMachine":65540,"link":[{"href":"http://131.254.13.194:9000/api/instance/65542","rel":"self"}]},{"remoteId":null,"cloudProviderId":null,"remoteState":"OK","applicationComponent":2,"applicationInstance":1,"virtualMachine":65536,"link":[{"href":"http://131.254.13.194:9000/api/instance/65543","rel":"self"}]}]
========== STEP 3:
POST 131.254.13.194:9000/api/instance REQUEST header: {content-type : application/json X-Auth-Token : 1t0jn59g2stl4eh6rkki9vek4og3dm69u9svt9uknruiqfk3o9nogn54cvra6ut1dh1v9o17hs0o0c4ineud7nusjkgk7n2mdhaojil20fee626nj8sufdb2roe3joei7vijmnh0jiptmclr9l5g9kvvmvpq9tu5f24q9en74ekqmc06nh8hd9sdamel46h4dokvsbmmbuq7o X-Auth-UserId : 1 X-Tenant : admin } body: {"virtualMachine":"65541","applicationInstance":"1","applicationComponent":"3"}
200 OK {"remoteId":null,"cloudProviderId":null,"remoteState":null,"applicationComponent":3,"applicationInstance":1,"virtualMachine":65541,"link":[{"href":"http://131.254.13.194:9000/api/instance/65545","rel":"self"}]}
GET http://131.254.13.194:9000/api/instance
[{"remoteId":null,"cloudProviderId":null,"remoteState":"OK","applicationComponent":1,"applicationInstance":1,"virtualMachine":65540,"link":[{"href":"http://131.254.13.194:9000/api/instance/65542","rel":"self"}]},{"remoteId":null,"cloudProviderId":null,"remoteState":"OK","applicationComponent":2,"applicationInstance":1,"virtualMachine":65536,"link":[{"href":"http://131.254.13.194:9000/api/instance/65543","rel":"self"}]},{"remoteId":null,"cloudProviderId":null,"remoteState":"ERROR","applicationComponent":3,"applicationInstance":1,"virtualMachine":65541,"link":[{"href":"http://131.254.13.194:9000/api/instance/65545","rel":"self"}]}]
ExecWare Error
[debug] c.cloud.sync - HardwareWatchdog is watching 160 entities. [error] c.cloud.job - Error during execution of CreateInstanceJob{resource=769a3266-d377-43c3-acee-1a0e3714d5b5, tenant=4a6788c9-d554-4213-9003-f8c83b4cdc74}, calling onError handler components.job.JobException: components.job.JobException: de.uniulm.omi.cloudiator.lance.lca.LcaException: downstream exception occurred. at components.job.CreateInstanceJob.doWork(CreateInstanceJob.java:117) ~[io.github.cloudiator.colosseum-0.2.0-SNAPSHOT.jar:0.2.0-SNAPSHOT] at components.job.AbstractRemoteResourceJob.execute(AbstractRemoteResourceJob.java:70) ~[io.github.cloudiator.colosseum-0.2.0-SNAPSHOT.jar:0.2.0-SNAPSHOT] at components.job.JobWorker.run(JobWorker.java:41) ~[io.github.cloudiator.colosseum-0.2.0-SNAPSHOT.jar:0.2.0-SNAPSHOT] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_31] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_31] Caused by: components.job.JobException: de.uniulm.omi.cloudiator.lance.lca.LcaException: downstream exception occurred. at components.job.CreateInstanceJob.lambda$doWork$16(CreateInstanceJob.java:112) ~[io.github.cloudiator.colosseum-0.2.0-SNAPSHOT.jar:0.2.0-SNAPSHOT] at components.job.CreateInstanceJob$$Lambda$64/118469014.apply(Unknown Source) ~[na:na] at play.db.jpa.JPA.withTransaction(JPA.java:135) ~[com.typesafe.play.play-java-jpa_2.10-2.3.9.jar:2.3.9] at components.job.CreateInstanceJob.doWork(CreateInstanceJob.java:68) ~[io.github.cloudiator.colosseum-0.2.0-SNAPSHOT.jar:0.2.0-SNAPSHOT] at components.job.AbstractRemoteResourceJob.execute(AbstractRemoteResourceJob.java:70) ~[io.github.cloudiator.colosseum-0.2.0-SNAPSHOT.jar:0.2.0-SNAPSHOT] Caused by: de.uniulm.omi.cloudiator.lance.lca.LcaException: downstream exception occurred. at de.uniulm.omi.cloudiator.lance.client.LifecycleClient.handleRemoteException(LifecycleClient.java:110) ~[io.github.cloudiator.lance.client-0.2.0-SNAPSHOT.jar:na] at de.uniulm.omi.cloudiator.lance.client.LifecycleClient.deploy(LifecycleClient.java:95) ~[io.github.cloudiator.lance.client-0.2.0-SNAPSHOT.jar:na] at components.job.CreateInstanceJob.lambda$doWork$16(CreateInstanceJob.java:107) ~[io.github.cloudiator.colosseum-0.2.0-SNAPSHOT.jar:0.2.0-SNAPSHOT] at components.job.CreateInstanceJob$$Lambda$64/118469014.apply(Unknown Source) ~[na:na] at play.db.jpa.JPA.withTransaction(JPA.java:135) ~[com.typesafe.play.play-java-jpa_2.10-2.3.9.jar:2.3.9] Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_31] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345) ~[na:1.8.0_31] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_31] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_31] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_31]