libxl: write physical-device node if user did not supply a block script
authorIan Campbell <Ian.Campbell@citrix.com>
Tue, 7 Aug 2012 13:26:29 +0000 (14:26 +0100)
committerIan Campbell <Ian.Campbell@citrix.com>
Tue, 7 Aug 2012 13:26:29 +0000 (14:26 +0100)
commit15116f1c254a8aa7774e2f73a3e1340a6decd867
treee37349ee5d97eac5a1e041f09f94a5b4162b2c64
parent2a9fbb27320c7cdf0a58003c7e8d752def737ecd
libxl: write physical-device node if user did not supply a block script

This reverts one of the intentional changes from 25733:353bc0801b11.
That change exposed an issue with the xl migration protocol, which
although safe triggers the hotplug scripts device sharing logic.

For 4.2 we disable this logic by writing the physical-device xenstore
node ourselves if a user did not supply a script. If the user did
supply a script then we continue to rely on it to write the
physical-device node (not least because the script may create the
device and therefore it is not available before we run the script).

This means that to support localhost migration a block hotplug script
needs to be robust against adding a device twice and should not
deactivate the device until it has been removed twice.

This should be revisited for 4.3.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl.c