Open mdrakiburrahman opened 3 years ago
I ran into the following issues when setting up 2 containers in HA mode - this PR contains fixes for all 3 issues.
health-check.ps1 logic is faulty, when setup.ps1 is accessing status-check.txt, the container shuts down
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 with setup.ps1 that was causing the issue.
Run-Process
setup.ps1
Passing in HA_PORT doesn't work, as $PORT isn't being passed in correctly in code
Changed to $PORT = if (!$HA_PORT) { "8060" } else { $HA_PORT }
$PORT = if (!$HA_PORT) { "8060" } else { $HA_PORT }
Adding second container doesn't work for HA due to order of operations and incorrect remote access command
-EnableRemoteAccess
-EnableRemoteAccessInContainer
-RegisterNewNode
I've tested running 2 containers in HA mode, it's now working with the Health Check enabled:
I think those changes were added in https://github.com/Azure/Azure-Data-Factory-Integration-Runtime-in-Windows-Container/commit/7eb565787217ee6f1e15665b360af7e0e229f5ab
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:![image](https://user-images.githubusercontent.com/46581776/120936564-78fbc900-c6d6-11eb-94d3-84c1ed30297d.png)