Fixed issues when onboarding HA setup, and issues with Health Check script #5
+47
−10
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.
I ran into the following issues when setting up 2 containers in HA mode - this PR contains fixes for all 3 issues.
Issue
health-check.ps1 logic is faulty, when setup.ps1 is accessing status-check.txt, the container shuts down
Resolution
Added new function
Run-Process
that uses a temporary file based on the process ID to grab the output within the function and performs cleanup. This avoids the above issue with file conflicts withsetup.ps1
that was causing the issue.Issue
Passing in HA_PORT doesn't work, as $PORT isn't being passed in correctly in code
Resolution
Changed to
$PORT = if (!$HA_PORT) { "8060" } else { $HA_PORT }
Issue
Adding second container doesn't work for HA due to order of operations and incorrect remote access command
Resolution
-EnableRemoteAccess
to-EnableRemoteAccessInContainer
-EnableRemoteAccessInContainer
then-RegisterNewNode
I've tested running 2 containers in HA mode, it's now working with the Health Check enabled: