vmspawn: log failures to dismiss completed QMP jobs

Most errors that end the event loop are logged where they happen, except
these two.

Signed-off-by: Martin Pitt <martin@amutable.com>
(cherry picked from commit 7681db4546d0eb3ef9160e90200ccaf5c9d7edc2)
This commit is contained in:
Martin Pitt
2026-10-16 17:24:51 +01:00
committed by Luca Boccassi
parent 8b54adc7c4
commit ad0f1d66f2
+6 -2
View File
@@ -1915,13 +1915,17 @@ static int dispatch_pending_job(VmspawnQmpBridge *bridge, sd_json_variant *data)
/* Dismiss the concluded job before running the continuation */
_cleanup_(sd_json_variant_unrefp) sd_json_variant *dismiss_args = NULL;
r = sd_json_buildo(&dismiss_args, SD_JSON_BUILD_PAIR_STRING("id", job_id));
if (r < 0)
if (r < 0) {
log_error_errno(r, "Failed to build job-dismiss arguments for '%s': %m", job_id);
return sd_event_exit(qmp_client_get_event(bridge->qmp), r);
}
r = qmp_client_invoke(bridge->qmp, /* ret_slot= */ NULL, "job-dismiss", QMP_CLIENT_ARGS(dismiss_args),
on_job_dismiss_complete, /* userdata= */ NULL);
if (r < 0)
if (r < 0) {
log_error_errno(r, "Failed to send job-dismiss for '%s': %m", job_id);
return sd_event_exit(qmp_client_get_event(bridge->qmp), r);
}
if (!job->on_concluded)
return 1;