I have an upstart job that is configured to run a one-off script with a few virsh commands to import and start VMs. This job is configured to start on started libvirt-bin
.
However, I'm encountering an issue where the libvirt-bin service starts, and forks, but isn't actually usable until it begins listening on it's socket. However, once the process forks, Upstart considers the process started, and my virsh commands fail because of the race condition with the libvirt-bin socket.
Is there a way to solve this with only Upstart, or do I need to add a function for checking the socket to my script to keep it from failing out? I've tried using the upstart-socket-bridge and upstart-file-bridge, to no avail.
This is running on Ubuntu 14.04 with Upstart 1.12.