Skip to content

Commit

Permalink
Merge "ToR Agent NodeStatus - No ToR config"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Jun 3, 2015
2 parents 1f549ee + 1fe4bc0 commit 6876672
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/vnsw/agent/uve/agent_uve_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,17 @@ void AgentUveBase::VrouterAgentProcessState
find(ConnectionStatus::UP)->second);
bool is_cup = true;
bool is_tor_cup = true;
bool is_tor_connected = false;
string tor_type(g_process_info_constants.ConnectionTypeNames.
find(ConnectionType::TOR)->second);
// Iterate to determine process connectivity status
for (std::vector<ConnectionInfo>::const_iterator it = cinfos.begin();
it != cinfos.end(); it++) {
const ConnectionInfo &cinfo(*it);
const std::string &conn_status(cinfo.get_status());
if (cinfo.get_type() == tor_type) {
is_tor_connected = true;
}
if (conn_status != cup) {
if (cinfo.get_type() == tor_type) {
is_tor_cup = false;
Expand All @@ -173,6 +177,10 @@ void AgentUveBase::VrouterAgentProcessState
} else if (!is_tor_cup) {
// waiting for TOR to connect
pstate = ProcessState::NON_FUNCTIONAL;
} else if (!is_tor_connected && agent_->tor_agent_enabled()) {
// waiting for first TOR config to arrive
pstate = ProcessState::NON_FUNCTIONAL;
message += " No ToR Config";
} else {
pstate = ProcessState::FUNCTIONAL;
}
Expand Down

0 comments on commit 6876672

Please sign in to comment.