Changing HEART_COMMAND on the fly
Scott Brooks
scott.brooks@REDACTED
Mon Jan 25 16:50:27 CET 2010
We have a system in production using heart to monitor it.
We have a bug in our startup scripts that we want to fix, but we don't want to take down the running node.
Using heart:set_cmd(NewCmd) and then killing the existing server, I can get it to startup successfully with the new command, but unfortunately it retains the existing HEART_COMMAND environment variable, and so when the new node starts up, and I check heart:get_cmd(). It returns the old command.
I tried a os:putenv(HEAT_COMMAND, NewCmd), and that looks like it adjusts the existing nodes environment fine, but since heart is what restarts the erlang node, it's using the HEART_COMMAND as it exists for the heart process, not the erlang node environment.
I also tried killing off heart so I could restart it with a new environment, but that takes down the existing node.
Any thoughts as to how we can accomplish this?
Thanks
---------------------
Scott Brooks
Web Developer
Epic Advertising - New York, Toronto, San Francisco, London
www.EpicAdvertising.com
60 Columbia Way, Suite 310
Markham, ON L3R 0C9
(905) 946-0300 x2356 - phone
(888) 666-3120 - fax
scott.brooks@REDACTED
More information about the erlang-questions
mailing list