Skip to content

make config names unique#357

Closed
evanmcc wants to merge 1 commit intoerlware:masterfrom
evanmcc:unique-configs
Closed

make config names unique#357
evanmcc wants to merge 1 commit intoerlware:masterfrom
evanmcc:unique-configs

Conversation

@evanmcc
Copy link
Copy Markdown
Contributor

@evanmcc evanmcc commented Jun 30, 2015

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_TESTING flag, since this isn't ideal behavior in production.

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.
@tsloughter tsloughter self-assigned this Jul 8, 2015
@tsloughter
Copy link
Copy Markdown
Member

Been meaning to merge this. Kind of agree about the rm thing but also not as happy with having to set MULTINODE_TESTING...

@evanmcc
Copy link
Copy Markdown
Contributor Author

evanmcc commented Jul 17, 2015 via email

@saleyn
Copy link
Copy Markdown
Contributor

saleyn commented Dec 22, 2015

Perhaps the generated vm.2.args and sys.2.config could just be saved to vm.${NAME}.args and sys.${NAME}.config and this wouldn't require that randomness and removal business?

@evanmcc
Copy link
Copy Markdown
Contributor Author

evanmcc commented Dec 22, 2015 via email

@saleyn
Copy link
Copy Markdown
Contributor

saleyn commented Dec 22, 2015

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 vm.*.args is generated.

@saleyn
Copy link
Copy Markdown
Contributor

saleyn commented Dec 22, 2015

See this: #427

@evanmcc
Copy link
Copy Markdown
Contributor Author

evanmcc commented Dec 23, 2015

closing in favor of #427

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants