Azure / Azure-Data-Factory-Integration-Runtime-in-Windows-Container

Azure Data Factory Integration Runtime in Windows Container Sample
MIT License
25 stars 36 forks source link

Fixed issues when onboarding HA setup, and issues with Health Check script #5

Open mdrakiburrahman opened 3 years ago

mdrakiburrahman commented 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.

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 with setup.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

  1. Changed from -EnableRemoteAccess to -EnableRemoteAccessInContainer
  2. Switched order of execution - -EnableRemoteAccessInContainer then -RegisterNewNode

I've tested running 2 containers in HA mode, it's now working with the Health Check enabled: image

jikuja commented 1 year ago

I think those changes were added in https://github.com/Azure/Azure-Data-Factory-Integration-Runtime-in-Windows-Container/commit/7eb565787217ee6f1e15665b360af7e0e229f5ab