NAS-130472 / 24.10 / No need to reload http service when shutting down middleware #14155
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.
Problem
We were running into an issue where shutdown would be halted because of VMs even if they are not running. Changes were added (#13909) to not make an attempt to de-initialize vms if none of them are running but we still left a case.
Service's terminate methods are called when middleware is shutting down and in this case, what we were doing for VMs was:
Now for reasons unknown, during shutdown (2) would hang in conjunction with libvirtd for 120 secs. However (2) should not be executed at all in the first place.
Solution
Make sure we just close middleware libvirt connection when we are terminating middleware and when system is being shtudown, there is no need to actually reload http service either at that time and libvirt should just be gracefully shutdown.