NAS-138478 / 26.04 / Make sure locked alert gets properly generated for different services
This PR adds changes to ensure that locked alert gets properly generated for different services. How we ensure that is we bake in the functionality in attachment delegate itself so when locking happens, alert gets properly raised.
While adding this, i saw that we had regressed with an earlier change where if a dataset is about to be locked - we call attachment delegate before which means that it should be stopping necessary consumers by assuming that dataset is locked already. How this was handled previously was via a short/temporary cache which was removed with various refactoring which was done to use newer zfs implementation. That has been added as well and integration tests added to ensure we are good.
Jira URL: https://ixsystems.atlassian.net/browse/NAS-138478
We have NAS-137337 in which we're (hopefully) going to store server paths as a combination of dataset name and relative path. The reason for this is to make it simpler to associate the mount / unmount operations with affected "attachments". So maybe we should first sort out what we want to do with that one before getting too heavily invested in reworking attachments.