Release handling with several nodes of the same release using the same target system

Paul Guyot <>
Wed Nov 10 18:25:42 CET 2010


> Hi list!
> 
> What is the proper scenario of (up/down)grading a release having more
> than one node running the same release on the same target system?
> 
> Should it be something like this:
> 
> 1) on node, say "n1", I unpack/install and make permanent the release
> version
> 2) switch to other nodes and do only what? "install_release" ?
> 
> There is RELEASES file which is updated every time
> release_handler:install_release/1,2 is called, so each node using the
> same target system will try to update this file according to the
> internal state of its release_handler process. I'm not sure what is the
> proper way of doing this...
> 
> Thnx in adv.,
> 
> --D.

If all nodes share the same OTP files, this is what you can do:

On one node, call release_handler:unpack_release/1. On the other nodes, call release_handler:set_unpacked/2.

On each node, call release_handler:install_release/1,2. A node that would fail to upgrade/downgrade might restart to the previous release, since so far the RELEASES file is untouched.

Once all nodes are running the new release, you can make it permanent. You actually only need to do this on one node, since each node will write the RELEASES file, but you can do it on all nodes to update the state of the release_handler server.

If you want to remove a release, perform likewise. Remove it on one node, call release_handler:set_removed/1 on the others.

Paul
-- 
Semiocast                    http://semiocast.com/
+33.175000290 - 62 bis rue Gay-Lussac, 75005 Paris



More information about the erlang-questions mailing list