Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
storage: deactivate special LVs after detach
On block SD, LVs and whole VG is deactivated when domain is put into maintenance. However, during SD detach, special LVs are activated again, as a result of creating BlockStorageDomain object. This cause LVs are activated again, but never properly deactivated. After SD detach, we are left with stale DM links, which can cause subsequent issues, e.g. multipath device cannot be removed. Proper solution would be to refactor BlockStorageDomain constructor not to activate special LVs in constructor and activate them when needed. This would require lots of changes with high risk to instorduce more issues than issues it solves. Deativate special LVs after detach. With this fix, multipath device can be removed after removing storage domain. Multipath device is present only in case SD refresh happens beforer LUN is removed from storage server. If no other storage domain is on given storage server, no multipath device for removed SD won't appear even after SD refresh, as host will log out from storage server. Multipath device can be removed with multipath -f <WWID> echo 1 > /sys/block/<device-name>/device/delete which is proper way how to remove multipath block device. Add context manager, which tears down storage domain upon exiting code block and use it during SD detach. Change-Id: Ic7b390450ce71571fb651f79566546b94d538f51 Bug-Url: https://bugzilla.redhat.com/1928041 Signed-off-by: Vojtech Juranek <vjuranek@redhat.com>
- Loading branch information