These two patches add support for using a Unix domain socket to
directly access imageio in the case where imageio is running on the
conversion host (usually that means virt-v2v is running on the RHV
node and something else -- eg. CFME scripts -- arranges that the RHV
node is the same one running imageio).
Conversions in the normal case are not affected - they happen over TCP
as usual.
This was extremely hard to test, but I did eventually manage to test
it both ways. The log from the Unix domain socket case is here:
https://paste.fedoraproject.org/paste/RDhnpSaoUGI-jccIKy2e-g
You can tell that the optimization was used because you will see this
in the debug output:
disk.id = 'c5bb72bf-b9ab-4797-9ecf-fcbf79679742'
host.id = '87daa64d-b27e-4336-a156-973544be708b'
transfer.id = '2207ddda-00fd-4caf-b02c-e025e8173da9'
imageio features: flush=True trim=False zero=True
unix_socket='\x00/org/ovirt/imageio'
optimizing connection using unix socket '\x00/org/ovirt/imageio'
(Note are the references to the unix socket.)
This requires the absolute latest versions of imageio (1.4.0) and
ovirt-engine (4.2.4-5) in order to get the optimization. However it
should work (without optimization) with older versions.
Thanks Nir Soffer and Daniel Erez in particular for help with this.
Rich.