-
Notifications
You must be signed in to change notification settings - Fork 292
CA-401242: avoid long-running, idle connections on VDI.pool_migrate #6102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or 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
might be worth specifying that the connection that's idle for 12 hours is not the main one, but the auxiliary one |
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 the migration lasts for more than 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. Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
This allows to reduce most of the indentation in check_operation_error, which returns searches for a single error and returns it. Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
94a890e
to
60b440b
Compare
lindig
approved these changes
Nov 5, 2024
robhoes
approved these changes
Nov 5, 2024
Vincent-lau
reviewed
Nov 5, 2024
@@ -22,49 +22,49 @@ open D | |||
(**************************************************************************************) | |||
(* current/allowed operations checking *) | |||
|
|||
let feature_of_op = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this function should go to Smint
but I think it is ok to keep it here for this PR for clarity as it was here.
60b440b
to
0132829
Compare
There's no seeming reason these were missing, and they need to be added to be able to map the VDI operations to SR ones for better error messages Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
0132829
to
e40b3fc
Compare
Vincent-lau
approved these changes
Nov 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
And after reverting the patch:
The changes are best reviewed one by one, and while ignoring whitespace, if using github.