enable logging of the management server id

This commit is contained in:
Chiradeep Vittal 2011-08-31 11:22:34 -07:00
parent 78ded9c78e
commit 1ddda37e13
3 changed files with 11 additions and 1 deletions

View File

@ -70,6 +70,7 @@ public class SecurityIngressRulesCmd extends Command {
String signature;
Long seqNum;
Long vmId;
Long msId;
IpPortAndProto [] ruleSet;
public SecurityIngressRulesCmd() {
@ -158,5 +159,13 @@ public class SecurityIngressRulesCmd extends Command {
}
return count;
}
public void setMsId(long msId) {
this.msId = msId;
}
public Long getMsId() {
return msId;
}
}

View File

@ -148,7 +148,7 @@ public class SecurityGroupManagerImpl implements SecurityGroupManager, SecurityG
ScheduledExecutorService _executorPool;
ScheduledExecutorService _cleanupExecutor;
private long _serverId;
protected long _serverId;
private int _timeBetweenCleanups = TIME_BETWEEN_CLEANUPS; // seconds
protected int _numWorkerThreads = WORKER_THREAD_COUNT;

View File

@ -162,6 +162,7 @@ public class SecurityGroupManagerImpl2 extends SecurityGroupManagerImpl{
SecurityIngressRulesCmd cmd = generateRulesetCmd(vm.getInstanceName(), vm.getPrivateIpAddress(),
vm.getPrivateMacAddress(), vm.getId(), null,
work.getLogsequenceNumber(), rules);
cmd.setMsId(_serverId);
if (s_logger.isTraceEnabled()) {
s_logger.trace("SecurityGroupManager v2: sending ruleset update for vm " + vm.getInstanceName() +
": num rules=" + cmd.getRuleSet().length + " num cidrs=" + cmd.getTotalNumCidrs() + " sig=" + cmd.getSignature());