-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch fixes 2 issues related to the symlinks, or lack of, that connectors' connect_volume methods return. Some connectors always return the block device instead of a symlink for encrypted volumes, and other connectors return a symlink that is owned by the system's udev rules. Both cases are problematic Returning the real device can prevent the encryptor connect_volume to complete successfully, and in other cases (such as nvmeof) it completes, but on the connector's disconnect volume it will leave the device behind (i.e., /dev/nvme0n1) preventing new connections that would use that same device name. Returning a symlink owned by the system's udev rules means that they can be reclaimed by those rules at any time. This can happen with cryptsetup, because when it creates a new mapping it triggers udev rules for the device that can reclaim the symlink after os-brick has replaced it. This patch creates a couple of decorators to facilitate this for all connectors. These decorators transform the paths so that the callers gets the expected symlink, but the connector doesn't need to worry about it and will always see the value it returns regardless of what symlink the caller gets. From this moment onwards we use our own custom symlink that starts with "/dev/disk/by-id/os-brick". The patch fixes bugs in other connectors (such as the RBD local connection), but since there are no open bugs they have not been reported. This commit also includes a squash to add a fix and releasenote from Ib001e2b4d1347754c2b46730bc10d86e8cdab7ad to reduce backporting workload. Closes-Bug: #1964379 Closes-Bug: #1967790 Closes-Bug: #1981455 Change-Id: Ie373ab050dcc0a35c749d9a53b6cf5ca060bcb58 (cherry picked from commit 1583a50) (cherry picked from commit 0bd5dc9) (cherry picked from commit b31b109) Conflicts: os_brick/utils.py os_brick/initiator/connectors/iscsi.py os_brick/initiator/connectors/nvmeof.py (cherry picked from commit cf69f92)
- Loading branch information
Showing
17 changed files
with
580 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.