Skip to content

Commit

Permalink
more scheduler debug output about selecting a node
Browse files Browse the repository at this point in the history
  • Loading branch information
llunak committed May 31, 2019
1 parent b20ff79 commit 7421b5e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
21 changes: 14 additions & 7 deletions scheduler/compileserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,20 @@ bool CompileServer::is_eligible(const Job *job)
bool jobs_okay = int(m_jobList.size()) < m_maxJobs;
bool load_okay = m_load < 1000;
bool version_okay = job->minimalHostVersion() <= protocol;
return jobs_okay
&& (m_chrootPossible || job->submitter() == this)
&& load_okay
&& version_okay
&& m_acceptingInConnection
&& can_install(job).size()
&& this->check_remote(job);
bool eligible = jobs_okay
&& (m_chrootPossible || job->submitter() == this)
&& load_okay
&& version_okay
&& m_acceptingInConnection
&& can_install(job).size()
&& check_remote(job);
#if DEBUG_SCHEDULER > 2
trace() << nodeName() << " is_eligible: " << eligible << " (jobs_okay " << jobs_okay << ", load_okay " << load_okay
<< ", version_okay " << version_okay << ", chroot_or_local " << (m_chrootPossible || job->submitter() == this)
<< ", accepting " << m_acceptingInConnection << ", can_install " << (can_install(job).size() != 0)
<< ", check_remote " << check_remote(job) << ")" << endl;
#endif
return eligible;
}

unsigned int CompileServer::remotePort() const
Expand Down
5 changes: 5 additions & 0 deletions scheduler/scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,9 @@ static CompileServer *pick_server(Job *job)
if (!job->preferredHost().empty()) {
for (list<CompileServer *>::iterator it = css.begin(); it != css.end(); ++it) {
if ((*it)->matches(job->preferredHost()) && (*it)->is_eligible(job)) {
#if DEBUG_SCHEDULER > 1
trace() << "taking preferred " << (*it)->nodeName() << " " << server_speed(*it, job, true) << endl;
#endif
return *it;
}
}
Expand Down Expand Up @@ -639,7 +642,9 @@ static CompileServer *pick_server(Job *job)

// Ignore ineligible servers
if (!cs->is_eligible(job)) {
#if DEBUG_SCHEDULER > 1
trace() << cs->nodeName() << " not eligible" << endl;
#endif
continue;
}

Expand Down

0 comments on commit 7421b5e

Please sign in to comment.