make config names unique#357
Closed
evanmcc wants to merge 1 commit intoerlware:masterfrom
Closed
Conversation
when using RELX_REPLACE_OS_VARS to start multiple release nodes, there is a startup race since all of the releases are attempting to use the same release file ($name.2.config). This code generates a random identifier so that each release start uses a separate file, then cleans up after itself so it doesn't leak config files.
Member
|
Been meaning to merge this. Kind of agree about the |
Contributor
Author
|
could just change the config dir to /tmp/relx/ or something if you're
replacing variables.
|
Contributor
|
Perhaps the generated |
Contributor
Author
|
that would better limit the number of files, I'll give it a shot.
|
Contributor
|
Actually @tsloughter just merged my PR, that affected some of this logic. Let me do another commit/PR that addresses this as I have a pretty clear idea of how to evaluate NAME properly, so that it's available before |
Contributor
|
See this: #427 |
Contributor
Author
|
closing in favor of #427 |
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.
when using RELX_REPLACE_OS_VARS to start multiple release nodes, there
is a startup race since all of the releases are attempting to use the
same release file ($name.2.config). This code generates a random
identifier so that each release start uses a separate file, then cleans
up after itself so it doesn't leak config files.
I'm not super pleased by the rm at line 100. I think that it's safe enough, but ugly and potentially fragile. Any other suggestions are welcomed. I did it that way because it's rather hard to clean up since there are so many paths, and several of them end in exec. I wonder if this entire code path shouldn't additionally be walled off behind a
MULTINODE_TESTINGflag, since this isn't ideal behavior in production.