Skip to content

Commit

Permalink
Drop HTTP Status 404 and 307 in the scheduler library.
Browse files Browse the repository at this point in the history
This fix drops `404 Not Found` and `307 Temporary Redirect` in
the scheduler library, instead of treating them as Event::ERROR.
(MESOS-5020)

Review: https://reviews.apache.org/r/45327/
  • Loading branch information
yongtang authored and vinodkone committed Mar 25, 2016
1 parent 32a989a commit 513a200
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/scheduler/scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,22 @@ class MesosProcess : public ProtobufProcess<MesosProcess>
return;
}

if (response->code == process::http::Status::NOT_FOUND) {
// This could happen if the master libprocess process has not yet set up
// HTTP routes.
LOG(WARNING) << "Received '" << response->status << "' ("
<< response->body << ") for " << call.type();
return;
}

if (response->code == process::http::Status::TEMPORARY_REDIRECT) {
// This could happen if the detector detects a new leading master before
// master itself realizes it (e.g., ZK watch delay).
LOG(WARNING) << "Received '" << response->status << "' ("
<< response->body << ") for " << call.type();
return;
}

// We should be able to get here only for AuthN errors which is not
// yet supported for HTTP frameworks.
error("Received unexpected '" + response->status + "' (" +
Expand Down

0 comments on commit 513a200

Please sign in to comment.