feat: make auto-allocate-host and auto-release-host configurable#197
Open
cchristous wants to merge 2 commits intorenderedtext:masterfrom
Open
feat: make auto-allocate-host and auto-release-host configurable#197cchristous wants to merge 2 commits intorenderedtext:masterfrom
cchristous wants to merge 2 commits intorenderedtext:masterfrom
Conversation
Add SEMAPHORE_AGENT_AUTO_ALLOCATE_HOST and SEMAPHORE_AGENT_AUTO_RELEASE_HOST environment variables to control the host resource group's auto-allocate and auto-release behavior. Both default to "true" for backward compatibility. Setting auto-release-host to "false" prevents License Manager from releasing dedicated hosts when instances terminate, which is necessary for pools with pre-allocated static hosts where min == max.
…isting host resource group tests Add a test verifying that SEMAPHORE_AGENT_AUTO_ALLOCATE_HOST and SEMAPHORE_AGENT_AUTO_RELEASE_HOST flow through to the CloudFormation template. Also fix the two existing host resource group tests that were missing the auto-host-recovery parameter added in d1f68f2.
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.
Summary
SEMAPHORE_AGENT_AUTO_ALLOCATE_HOSTandSEMAPHORE_AGENT_AUTO_RELEASE_HOSTenvironment variables to control the host resource group's License Manager behavior"true"for backward compatibilityProblem
The
auto-release-hostsetting on the host resource group is hardcoded to"true". This means License Manager releases dedicated hosts when all instances on them terminate. For pools with pre-allocated static hosts (where min == max and hosts are manually managed), this causes the hosts to be released during instance replacements (e.g., AMI updates), losing the capacity reservation.Fix
Make both settings configurable via environment variables. Pools that use pre-allocated hosts can set
SEMAPHORE_AGENT_AUTO_RELEASE_HOST=falsein their deploy configuration to prevent License Manager from releasing their hosts.Why this is safe
"true"/"true") — no change for existing pools