From d4a106319dbbf2c747e0a24642f399446bd81fca Mon Sep 17 00:00:00 2001 From: frank Date: Tue, 1 Nov 2011 16:45:24 -0700 Subject: [PATCH] Disable baremetal fullsync * Disable sync until we find a way that only tracks status but not does action * * The scenario is: Baremetal will reboot host when creating template. Given most * servers take a long time to boot up, there would be a period that mgmt server finds * the host is stopped through fullsync. Then mgmt server updates database with marking the host as * stopped, after that, the host comes up and full sync then indicates it's running. Because * in database the host is already stopped, mgmt server sends out a stop command. * As a result, creating image gets never happened. --- .../com/cloud/baremetal/BareMetalResourceBase.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/server/src/com/cloud/baremetal/BareMetalResourceBase.java b/server/src/com/cloud/baremetal/BareMetalResourceBase.java index 69af9f8302b..bc541fd58e3 100755 --- a/server/src/com/cloud/baremetal/BareMetalResourceBase.java +++ b/server/src/com/cloud/baremetal/BareMetalResourceBase.java @@ -509,7 +509,16 @@ public class BareMetalResourceBase implements ServerResource { protected HashMap deltaSync() { final HashMap changes = new HashMap(); - + /* + * Disable sync until we find a way that only tracks status but not does action + * + * The scenario is: Baremetal will reboot host when creating template. Given most + * servers take a long time to boot up, there would be a period that mgmt server finds + * the host is stopped through fullsync. Then mgmt server updates database with marking the host as + * stopped, after that, the host comes up and full sync then indicates it's running. Because + * in database the host is already stopped, mgmt server sends out a stop command. + * As a result, creating image gets never happened. + * if (_vmName == null) { return null; } @@ -542,7 +551,7 @@ public class BareMetalResourceBase implements ServerResource { changeVmState(_vmName, newState); changes.put(_vmName, newState); } - + */ return changes; }