b79f25e qemu: Track the API which started the current job

Authored and Committed by Jiri Denemark 9 years ago
    qemu: Track the API which started the current job
    
    This is very helpful when we want to log and report why we could not
    acquire a state change lock. Reporting what job keeps it locked helps
    with understanding the issue. Moreover, after calling
    virDomainGetControlInfo, it's possible to tell whether libvirt is just
    stuck somewhere within the API (or it just forgot to cleanup the job) or
    whether libvirt is waiting for QEMU to reply.
    
    The error message will look like the following:
    
        # virsh resume cd
        error: Failed to resume domain cd
        error: Timed out during operation: cannot acquire state change lock
        (held by remoteDispatchDomainSuspend)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=853839
    
    Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
    
        
file modified
+33 -10
file modified
+2 -0