Skip to content

Commit

Permalink
Merge "Handle Update of dest IP for Health Check instance"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Feb 4, 2016
2 parents 201e963 + b1547a7 commit 12bbf08
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/vnsw/agent/oper/health_check.cc
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ void HealthCheckService::PostAdd() {
bool HealthCheckService::Copy(HealthCheckTable *table,
const HealthCheckServiceData *data) {
bool ret = false;
bool dest_ip_changed = false;

if (monitor_type_ != data->monitor_type_) {
monitor_type_ = data->monitor_type_;
Expand Down Expand Up @@ -271,6 +272,7 @@ bool HealthCheckService::Copy(HealthCheckTable *table,

if (dest_ip_ != data->dest_ip_) {
dest_ip_ = data->dest_ip_;
dest_ip_changed = true;
ret = true;
}

Expand Down Expand Up @@ -318,6 +320,11 @@ bool HealthCheckService::Copy(HealthCheckTable *table,
inst->ip_->set_destination_ip(dest_ip_);
ret = true;
} else {
if (dest_ip_changed) {
// change in destination IP needs to be propagated
// explicitly to metadata-IP object
it->second->ip_->set_destination_ip(dest_ip_);
}
it++;
}
it_cfg++;
Expand Down

0 comments on commit 12bbf08

Please sign in to comment.