On Mon, Jan 25, 2016 at 06:47:43PM +0200, Dimitris Aragiorgis wrote:
> Until now, backend used the disk's index when creating the symlink
> of the corresponding block device. This is problematic. For example
> if one starts an instance with three disks [disk0, disk1, disk2],
> then removes the middle one (disk1), and then adds a third (disk3),
> the disks in config data will be [disk0, disk2, disk3] and thus the
> new one will get index 2. When trying to assemble the newly created
> disk we will overwrite the disk2's symlink.
> 
> Fix the above behavior by creating an additional symlink based on
> the disk's uuid and pass this to the hypervisor. We continue to
> create an index-based symlink as well, but this behavior is
> inherently problematic when using hotplug.
> 
> To keep old instances migratable, we still create the old type
> of symlink during BlockdevOpen() which is invoked on the target node
> just before migration.
> 
> Also remove a really old check that did not make any sense anymore
> in GetInstanceMigratable().
> 
> Signed-off-by: Dimitris Aragiorgis <[email protected]>
> ---
>  lib/backend.py                     |   51 
> +++++++++++++++++++++++++-----------
>  test/py/ganeti.backend_unittest.py |   14 ++++++++--
>  2 files changed, 48 insertions(+), 17 deletions(-)

LGTM

-- 
Klaus Aehlig
Google Germany GmbH, Erika-Mann-Str. 33, 80636 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Matthew Scott Sucherman, Paul Terence Manicle

Reply via email to