(2.10) hotplug: Each hotplug qemu commmand with a separate socat
authorDimitris Aragiorgis <dimara@grnet.gr>
Tue, 14 Jan 2014 09:18:18 +0000 (11:18 +0200)
committerDimitris Aragiorgis <dimara@grnet.gr>
Thu, 27 Mar 2014 08:01:07 +0000 (10:01 +0200)
commita30e9f9970554ef8331c510f0ece49b173e5f8f5
tree7cc80de99d3697511624d331b3338509f5cb4a11
parent07e2aff5c067e325a31f2aa08975cc7e22ae5127
(2.10) hotplug: Each hotplug qemu commmand with a separate socat

Previously we issued one socat command with two "\n" separated
actions (e.g. netdev_add ...\ndevice_add...)

After having observed a strange monitor behavior [1] splitting
those commands and introducing a sleep time in between, may reduce
any race possibilities. Additionally it will be a step forward
parsing monitor output of each command and decide whether to
modify runtime files or raise a HotplugError.

This patch we simply changes _CallHotplugCommand() to take a
list of commands and issue them separately. Introduces one second
sleep after each command and removes sleep from HotModDevice().

[1] https://groups.google.com/d/msg/ganeti-devel/hCQnmuqKtU0/UWGnw251cskJ

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
lib/hypervisor/hv_kvm.py