Fixing bug to successfully kill AppHealth Gracefully & VMWatch. #59
Merged
frank-pang-msft merged 4 commits intofeature/v2/bootstrapVMWatchfrom Mar 19, 2024
Merged
Conversation
1. Fix bug where we were not using the global vmWatchCommand variable so the SIGTERM hanlder was not killing anything 1. set the `Pdealthsig` property on the command so the SIGTERM signal is sent to the sub process on parent process termination This fixes both issues: Before the fix if we kill app health vmwatch was always leaked After the fix: `kill <pid>` -> log message "Received shutdown request" and kill vmwatch. `kill -9 <pid>`-> no log message, vmwatch is killed Tests still need to be added, kevin is going to add those
- Added additional vscode extensions recomendations. - Added test_helper.bash to bats container - Added 2 additional integration tests in 7_vmwatch.bats so kill AppHealth process gracefully
…apphealth extension and vmwatch
frank-pang-msft
requested changes
Mar 18, 2024
Collaborator
frank-pang-msft
left a comment
There was a problem hiding this comment.
Looks good, just nits.
dpoole73
approved these changes
Mar 18, 2024
frank-pang-msft
approved these changes
Mar 19, 2024
klugorosado
added a commit
that referenced
this pull request
May 15, 2024
Changes by @dpoole73 - Fix bug where we were not using the global `vmWatchCommand` variable so the SIGTERM handler was not killing anything - set the `Pdealthsig` property on the command so the SIGTERM signal is sent to the sub process on parent process termination This fixes both issues: Before the fix if we killed app health process, vmwatch process was always leaked After the fix: `kill <pid>` -> log message "Received shutdown request" and kill vmwatch. `kill -9 <pid>`-> no log message, vmwatch is killed Changes by @klugorosado - Added Integration tests to kill AppHealth Gracefully with SIGTERM and SIGINT, and validated VMWatch Shutdown. - Added Integration tests to kill AppHealth Forcibly with SIGKILL, and validated VMWatch Shutdown. - Added the capability for dev containers to run Integration tests inside.
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
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.
Changes by @dpoole73
vmWatchCommandvariable so the SIGTERM handler was not killing anythingPdealthsigproperty on the command so the SIGTERM signal is sent to the sub process on parent process terminationThis fixes both issues:
Before the fix if we killed app health process, vmwatch process was always leaked
After the fix:
kill <pid>-> log message "Received shutdown request" and kill vmwatch.kill -9 <pid>-> no log message, vmwatch is killedChanges by @klugorosado