Add double check if instance is in error state
It may occur that an instance is set to temorarily (for some seconds) on the ERROR state and the client throws an exception. Yet the instance changes to the OK state afterwards but the deployment terminates.
Add a double check to avoid this issue.
Exception:
019-08-01 02:32:39 +0000 [ERROR] from de.uulm.omi.runtime.application.user.UserSpecParser in pool-2-thread-7 - ColosseumUserException thrown while deploying application! de.uulm.omi.cloudiator.generic.ColosseumUserException: ApplicationInstance cannot become ready, virtualmachine de.uniulm.omi.cloudiator.colosseum.client.entities.VirtualMachine@d3d1ab06 in error state at de.uulm.omi.runtime.application.deployment.ApplicationDeployer.isApplicationInstanceReady(ApplicationDeployer.java:206) at de.uulm.omi.runtime.application.deployment.ApplicationDeployer.waitForDeployment(ApplicationDeployer.java:173) at de.uulm.omi.runtime.application.deployment.ApplicationDeployment$1.call(ApplicationDeployment.java:81) at de.uulm.omi.runtime.application.deployment.ApplicationDeployment$1.call(ApplicationDeployment.java:71) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) 2019-08-01 02:32:39 +0000 [INFO] from de.uulm.omi.runtime.application.user.UserSpecParser in pool-2-thread-7 - application deployment terminated