Skip to content

Commit

Permalink
qmanager: improve unknown queue hello error
Browse files Browse the repository at this point in the history
Problem: when a hello response is received for a job with an
unkown queue, the error is not super helpful.

Instead of:
  jobmanager_hello_cb: ENOENT: map::at: No such file or directory

make it:
  jobmanager_hello_cb: unknown queue name (id=41137733632 queue=default)

This can occur when queues are reconfigured and the scheduler is reloaded,
so it's nice to have the job id and the offending queue name.
  • Loading branch information
garlick authored and milroy committed Apr 23, 2024
1 parent 0a70119 commit e03fadb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions qmanager/modules/qmanager_callbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,15 @@ int qmanager_cb_t::jobmanager_hello_cb (flux_t *h, const flux_msg_t *msg,
queue_name = qn_attr;
else
queue_name = ctx->opts.get_opt ().get_default_queue_name ();
if (ctx->queues.find (queue_name) == ctx->queues.end ()) {
flux_log (h,
LOG_ERR,
"%s: unknown queue name (id=%jd queue=%s)",
__FUNCTION__,
static_cast<intmax_t> (id),
queue_name.c_str ());
goto out;
}
queue = ctx->queues.at (queue_name);
running_job = std::make_shared<job_t> (job_state_kind_t::RUNNING,
id, uid, calc_priority (prio),
Expand Down

0 comments on commit e03fadb

Please sign in to comment.