-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CA-401242: avoid long-running, idle connections on VDI.pool_migrate (#…
…6102) When a VDI.pool_migrate starts at a pool member, a connection between the coordinator and that host remains open for the duration of the migration. This connection is completely idle. If it's open for 12 hours, stunnel closes the connection due to inactivity, which cancels the migration. To avoid this use an internal API that uses short-running connection whenever possible to avoid interrupting the migration. Also change nested if-else flow in vdi handling to use Result with let binds, and add missing CDI operations to storage operations. I've manually verified the fix by changing the stunnel timeout in the coordinator of a pool to 5 seconds and migrating a vdi used by a VM in another host: ``` # xe vdi-pool-migrate uuid=fdb8783f-8cdb-44d3-9327-992f047e6262 sr-uuid=c879ffc9-bb14-fec5-3d95-8959db9337eb 270c3dc8-27bc-4ef2-982a-a6142f0ffce1 ``` And after reverting the patch: ``` # xe vdi-pool-migrate uuid=270c3dc8-27bc-4ef2-982a-a6142f0ffce1 sr-uuid=aade9dc6-ff31-3204-4187-37f82ad06c77 Cannot forward messages because the server cannot be contacted. The server may be switched off or there may be network connectivity problems. host: 0a3a45a0-8754-4570-bfde-6ef6843ccda1 (xs2) ``` The changes are best reviewed one by one, and while ignoring whitespace, if using github.
- Loading branch information
Showing
9 changed files
with
472 additions
and
447 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
Oops, something went wrong.