bug 11701: cleanup of spurious message

This commit is contained in:
Abhinandan Prateek 2011-10-19 13:44:05 +05:30
parent 804bb510ff
commit 2f5adb0baf
3 changed files with 12 additions and 4 deletions

View File

@ -30,7 +30,11 @@ public class ClusterSyncAnswer extends Answer {
public static final int FULL_SYNC=0;
public static final int DELTA_SYNC=1;
public ClusterSyncAnswer() {
public ClusterSyncAnswer(long clusterId) {
_clusterId = clusterId;
result = false;
this.details = "Ignore sync as this is not a pool master";
_type = -1;
}
public ClusterSyncAnswer(long clusterId, HashMap<String, Pair<String, State>> newStates, int type){
@ -51,4 +55,8 @@ public class ClusterSyncAnswer extends Answer {
public boolean isFull(){
return _type==0;
}
public boolean isDelta(){
return _type==1;
}
}

View File

@ -6476,11 +6476,11 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
Host.Record hostr = poolr.master.getRecord(conn);
if (!_host.uuid.equals(hostr.uuid)) {
s_logger.debug("Not the master node so just return ok: " + _host.ip);
return new Answer(cmd, false, "Not a pool master");
return new ClusterSyncAnswer(cmd.getClusterId());
}
} catch (Exception e) {
s_logger.warn("Check for master failed, failing the Cluster sync command");
return new Answer(cmd, false, "Not a pool master");
return new ClusterSyncAnswer(cmd.getClusterId());
}
HashMap<String, Pair<String, State>> newStates;
int sync_type;

View File

@ -1862,7 +1862,7 @@ public class VirtualMachineManagerImpl implements VirtualMachineManager, Listene
ClusterSyncAnswer hs = (ClusterSyncAnswer) answer;
if (hs.isFull()) {
fullSync(hs.getClusterId(), hs.getNewStates());
} else {
} else if (hs.isDelta()) {
deltaSync(hs.getNewStates());
}
} else if (!answer.getResult()) {