From 60e52bc5652ba2c53b2e11ee07ec682ed901fac6 Mon Sep 17 00:00:00 2001 From: Stefan Derkits Date: Thu, 13 Jun 2013 16:52:18 +0200 Subject: [PATCH] fix bug in SchedB --- src/at/ac/tuwien/lsdc/sched/SchedulerB.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/at/ac/tuwien/lsdc/sched/SchedulerB.java b/src/at/ac/tuwien/lsdc/sched/SchedulerB.java index b859824..5774104 100644 --- a/src/at/ac/tuwien/lsdc/sched/SchedulerB.java +++ b/src/at/ac/tuwien/lsdc/sched/SchedulerB.java @@ -46,6 +46,7 @@ public class SchedulerB extends AbstractSchedulerWithMigration { @Override protected boolean deployApp(VirtualMachine vm, Application app) { + boolean deployed = false; if (!vm.enoughResources(app)) { try { vm.resizeVM(vm.getSize() + app.getSize(), vm.getRAM() + app.getRam(), vm.getCPU() @@ -54,9 +55,10 @@ public class SchedulerB extends AbstractSchedulerWithMigration { return false; } } - vm.startApplication(app); - app.setRunningOn(vm); - return true; + deployed = vm.startApplication(app); + if (deployed) + app.setRunningOn(vm); + return deployed; } /** -- 2.43.0