• Iustin Pop's avatar
    Alter the device activation code · 40a03283
    Iustin Pop authored
    This tiny patch fixes the breakage that the previous patch about
    activation did by removing the Close() call after activation.
    
    The initial reason for that call was that if the device is already
    active and open, but we need it closed, we close it automatically.
    
    This however conflicts with the 2-step open in the case the instance is
    already open.
    
    It makes sense to remove the call since in the current Ganeti setup,
    just doing Close() is not enough to change the device from (e.g.)
    primary to secondary, as some devices (e.g. md) might need Shutdown not
    Close.
    
    It also gets rid of a Close() in the CreateBlockDevice function, due to
    the same reasoning (although in Create the child should not have a
    different status anyway).
    
    Reviewed-by: imsnah
    40a03283
backend.py 45.3 KB