Skip to content
  • Dimitris Aragiorgis's avatar
    Further fixes concerning drbd port release · 42f25b0b
    Dimitris Aragiorgis authored
    Commit 3b3b1bca does not entirely fix the bug introduced in commit
    f396ad8c
    
    . It fixes consistency of config data in permanent storage, but
    does not ensure consistency in data held in runtime memory of masterd.
    
    The bug of duplicate ports is still triggered when LUInstanceRemove()
    invokes _RemoveDisks() and this returns False (in case
    call_blockdev_remove RPC fails). The drbd ports get returned in the
    pool, but execution is aborted and RemoveInstance() is never invoked.
    
    Due to the fact that port handling is not done with
    TemporaryReservationManager, ensure that ports are released, only if
    disk related config data is deleted.
    
    In _RemoveDisks() release ports only if all RPCs succeed.
    
    Extend _RemoveDisks() to include ignore_failures argument passed by
    _RemoveInstance() to handle the ports appropriately.
    
    Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
    Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
    42f25b0b