downgrade / rollback a hot deployment without restarting OTP

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

downgrade / rollback a hot deployment without restarting OTP

Andy Richards
Hi All,

I'm struggling to find documentation on how I perform a rollback of a
unsuccessful OTP hot deployment. I'm currently manually creating my .appup
file with upgrade and downgrade instructions and when I perform a
release_handler:install_release("someApp") my application hot deploys
successfully, excellent! What i cant figure out however is if there were a
problem following an upgrade how I downgrade / rollback to the previous
release? Ive tried release_handler:remove_release("someApp") unsuccessfully
as my upgrade remains active and I understand that I can restart OTP before
making the upgrade permanent however in the environment I'm working in a
restart would be unacceptable.

How do I downgrade / rollback a hot deployment without restarting OTP?

Many thanks,

Andy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120316/36a81541/attachment.html>

Reply | Threaded
Open this post in threaded view
|

downgrade / rollback a hot deployment without restarting OTP

Per Melin-4
On Mar 16, 2012, at 11:13 , Andy Richards wrote:

> I'm struggling to find documentation on how I perform a rollback of a
> unsuccessful OTP hot deployment. I'm currently manually creating my .appup
> file with upgrade and downgrade instructions and when I perform a
> release_handler:install_release("someApp") my application hot deploys
> successfully, excellent! What i cant figure out however is if there were a
> problem following an upgrade how I downgrade / rollback to the previous
> release?

It's been a long time since I last did this by hand, but if I remember correctly you simply do release_handler:install_release("OldVer") to roll back.



Reply | Threaded
Open this post in threaded view
|

downgrade / rollback a hot deployment without restarting OTP

Samuel Elliott
On Fri, Mar 16, 2012 at 1:54 PM, Per Melin <per.melin> wrote:

> On Mar 16, 2012, at 11:13 , Andy Richards wrote:
>
>> I'm struggling to find documentation on how I perform a rollback of a
>> unsuccessful OTP hot deployment. I'm currently manually creating my .appup
>> file with upgrade and downgrade instructions and when I perform a
>> release_handler:install_release("someApp") my application hot deploys
>> successfully, excellent! What i cant figure out however is if there were a
>> problem following an upgrade how I downgrade / rollback to the previous
>> release?
>
> It's been a long time since I last did this by hand, but if I remember correctly you simply do release_handler:install_release("OldVer") to roll back.

Seems so, reading Ferd's Guide:
http://learnyousomeerlang.com/relups#upgrading-the-release

Sam

>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions
> http://erlang.org/mailman/listinfo/erlang-questions



--
Samuel Elliott
sam
http://lenary.co.uk/
+44 (0)7891 993 664


Reply | Threaded
Open this post in threaded view
|

downgrade / rollback a hot deployment without restarting OTP

Andy Richards
Hi, thanks all! yes this resolved my issue. I did read the release handler
docs but didn't figure that downgrading would just mean reinstalling the
older version. I did have to work around a couple of gotchas, as I was
using rebar to generate my release and my .boot file was called my app.boot
not start.boot which the release handler was looking for. A sym link fixed
this. Also I didn't realease that code_change was called in my upgrade
release gem_server which allowed me to revert the State before downgrading
to the original version.

Thanks again for confirming release_handler:install_version was the way to
go.


Andy.


On Friday, 16 March 2012, Samuel Elliott <sam> wrote:
> On Fri, Mar 16, 2012 at 1:54 PM, Per Melin <per.melin> wrote:
>> On Mar 16, 2012, at 11:13 , Andy Richards wrote:
>>
>>> I'm struggling to find documentation on how I perform a rollback of a
>>> unsuccessful OTP hot deployment. I'm currently manually creating my
.appup
>>> file with upgrade and downgrade instructions and when I perform a
>>> release_handler:install_release("someApp") my application hot deploys
>>> successfully, excellent! What i cant figure out however is if there
were a
>>> problem following an upgrade how I downgrade / rollback to the previous
>>> release?
>>
>> It's been a long time since I last did this by hand, but if I remember
correctly you simply do release_handler:install_release("OldVer") to roll
back.

>
> Seems so, reading Ferd's Guide:
> http://learnyousomeerlang.com/relups#upgrading-the-release
>
> Sam
>
>>
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions
>> http://erlang.org/mailman/listinfo/erlang-questions
>
>
>
> --
> Samuel Elliott
> sam
> http://lenary.co.uk/
> +44 (0)7891 993 664
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120320/9e252dda/attachment.html>