• Dimitris Aragiorgis's avatar
    SetDiskID() before accepting an instance · a63985f3
    Dimitris Aragiorgis authored
    SetDiskID() fills physical_id slot of a Disk object.
    LUInstanceSetParams() does not invoke SetDiskID() upon creation of a
    new disk. As a result the physical_id slot of the Disk object in
    config data is missing.
    In case of ext disk template, in AcceptInstance() we invoke
    _GatherAndLinkBlockDevices(). This takes `instance` as an argument
    which includes current disks info. So, after adding a disk,
    migration of ext instances will fail because FindDevice() expects
    the physical_id slot.
    With this patch we invoke SetDiskID() for every disk of the instance
    before accept_instance() RPC.
    Fixes Issue 633.
    Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
    Signed-off-by: default avatarMichele Tartara <mtartara@google.com>
    Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
instance_migration.py 36 KB