1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-26 03:21:44 +03:00

qemu: Log which API is trying to acquire a job

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Jiri Denemark 2022-01-11 10:28:43 +01:00
parent d2fb6b4b21
commit a23ce0b956

View File

@ -827,9 +827,11 @@ qemuDomainObjBeginJobInternal(virQEMUDriver *driver,
unsigned long long duration = 0; unsigned long long duration = 0;
unsigned long long agentDuration = 0; unsigned long long agentDuration = 0;
unsigned long long asyncDuration = 0; unsigned long long asyncDuration = 0;
const char *currentAPI = virThreadJobGet();
VIR_DEBUG("Starting job: job=%s agentJob=%s asyncJob=%s " VIR_DEBUG("Starting job: API=%s job=%s agentJob=%s asyncJob=%s "
"(vm=%p name=%s, current job=%s agentJob=%s async=%s)", "(vm=%p name=%s, current job=%s agentJob=%s async=%s)",
NULLSTR(currentAPI),
qemuDomainJobTypeToString(job), qemuDomainJobTypeToString(job),
qemuDomainAgentJobTypeToString(agentJob), qemuDomainAgentJobTypeToString(agentJob),
qemuDomainAsyncJobTypeToString(asyncJob), qemuDomainAsyncJobTypeToString(asyncJob),
@ -931,13 +933,14 @@ qemuDomainObjBeginJobInternal(virQEMUDriver *driver,
if (priv->job.asyncJob && priv->job.asyncStarted) if (priv->job.asyncJob && priv->job.asyncStarted)
asyncDuration = now - priv->job.asyncStarted; asyncDuration = now - priv->job.asyncStarted;
VIR_WARN("Cannot start job (%s, %s, %s) for domain %s; " VIR_WARN("Cannot start job (%s, %s, %s) in API %s for domain %s; "
"current job is (%s, %s, %s) " "current job is (%s, %s, %s) "
"owned by (%llu %s, %llu %s, %llu %s (flags=0x%lx)) " "owned by (%llu %s, %llu %s, %llu %s (flags=0x%lx)) "
"for (%llus, %llus, %llus)", "for (%llus, %llus, %llus)",
qemuDomainJobTypeToString(job), qemuDomainJobTypeToString(job),
qemuDomainAgentJobTypeToString(agentJob), qemuDomainAgentJobTypeToString(agentJob),
qemuDomainAsyncJobTypeToString(asyncJob), qemuDomainAsyncJobTypeToString(asyncJob),
NULLSTR(currentAPI),
obj->def->name, obj->def->name,
qemuDomainJobTypeToString(priv->job.active), qemuDomainJobTypeToString(priv->job.active),
qemuDomainAgentJobTypeToString(priv->job.agentActive), qemuDomainAgentJobTypeToString(priv->job.agentActive),