Quantcast

install_release/1 always returns enoent error

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

install_release/1 always returns enoent error

Sergey S
Hello.

While reading OTP Design Principles (Release Handling part) I've found that function release_handler:install_release/1 doesn't work as expected. It returns a strange error, complaining about relup file:

Eshell V5.6.5  (abort with ^G)
1> release_handler:install_release("B").
{error,{enoent,"/usr/lib/erlang/releases/R12B/relup"}}

And it's true - there is no such a file. Instead of $ROOT/releases/R12B my relup file resides in $ROOT/releases/B. I have no idea why release_handler searches for relup in R12B dir :/ It looks like a bug...

I tried to copy my relup to R12B dir by hand, but It didn't help:

2> release_handler:install_release("B").
{error,{bad_relup_file,"/usr/lib/erlang/releases/R12B/relup"}}

Then, I've tried to find out the solution through Google. But what I've found (please, look at the comments for this article) was: http://spawnlink.com/articles/performing-real-time-upgrades-to-an-otp-system/

There are people who run into the same problem. Unfortunatelly nobody gave solution to this problem.

Here is the sources of my test app (1.4Kb): http://rapidshare.com/files/181485268/foo_app.tar.gz.html

Thanks!

--
Sergey

_______________________________________________
erlang-questions mailing list
[hidden email]
http://www.erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: install_release/1 always returns enoent error

Kaiduan Xie-2
I think you have to do install_release() from the erlang shell which starts release A. Please also read System Principles documentation
http://www.erlang.org/doc/pdf/system_principles.pdf  on how to start the first target system.

kaiduan

2009/1/9 Sergey S <[hidden email]>
Hello.

While reading OTP Design Principles (Release Handling part) I've found that function release_handler:install_release/1 doesn't work as expected. It returns a strange error, complaining about relup file:

Eshell V5.6.5  (abort with ^G)
1> release_handler:install_release("B").
{error,{enoent,"/usr/lib/erlang/releases/R12B/relup"}}

And it's true - there is no such a file. Instead of $ROOT/releases/R12B my relup file resides in $ROOT/releases/B. I have no idea why release_handler searches for relup in R12B dir :/ It looks like a bug...

I tried to copy my relup to R12B dir by hand, but It didn't help:

2> release_handler:install_release("B").
{error,{bad_relup_file,"/usr/lib/erlang/releases/R12B/relup"}}

Then, I've tried to find out the solution through Google. But what I've found (please, look at the comments for this article) was: http://spawnlink.com/articles/performing-real-time-upgrades-to-an-otp-system/

There are people who run into the same problem. Unfortunatelly nobody gave solution to this problem.

Here is the sources of my test app (1.4Kb): http://rapidshare.com/files/181485268/foo_app.tar.gz.html

Thanks!

--
Sergey

_______________________________________________
erlang-questions mailing list
[hidden email]
http://www.erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://www.erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: install_release/1 always returns enoent error

Sergey S
Hello.

On Fri, Jan 9, 2009 at 1:39 PM, Kaiduan Xie <[hidden email]> wrote:
I think you have to do install_release() from the erlang shell which starts release A.

I've already tried that. It leads to the same error.

Please also read System Principles documentation
http://www.erlang.org/doc/pdf/system_principles.pdf  on how to start the first target system.

I've read that. I'm using initial Erlang system created by my packet manager as a target system. I start erlang by the following command:
 
sudo erl -boot /usr/lib/erlang/releases/A/start

I also tried adding "-mode embedded". (I'm using sudo so that Erlang can correctly do unpack_release/1)

--
Sergey

_______________________________________________
erlang-questions mailing list
[hidden email]
http://www.erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: install_release/1 always returns enoent error

Kaiduan Xie-2
Please follow the System Principles closely and use the source code target_system.erl it provides. I had used the way to do hot update and it worked well.

On Fri, Jan 9, 2009 at 5:44 PM, Sergey S <[hidden email]> wrote:
Hello.


On Fri, Jan 9, 2009 at 1:39 PM, Kaiduan Xie <[hidden email]> wrote:
I think you have to do install_release() from the erlang shell which starts release A.

I've already tried that. It leads to the same error.

Please also read System Principles documentation
http://www.erlang.org/doc/pdf/system_principles.pdf  on how to start the first target system.

I've read that. I'm using initial Erlang system created by my packet manager as a target system. I start erlang by the following command:
 
sudo erl -boot /usr/lib/erlang/releases/A/start

I also tried adding "-mode embedded". (I'm using sudo so that Erlang can correctly do unpack_release/1)

--
Sergey


_______________________________________________
erlang-questions mailing list
[hidden email]
http://www.erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: install_release/1 always returns enoent error

Sergey S
In reply to this post by Sergey S
Hello.

But if there is a way to use hot updates without creating custom target system (we already have Erlang installed by packet manager, what is the need to have another one?), please tell me.

Thanks.

--
Sergey

_______________________________________________
erlang-questions mailing list
[hidden email]
http://www.erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: install_release/1 always returns enoent error

Sergey S
In reply to this post by Kaiduan Xie-2
Hello, Kaiduan!

Please follow the System Principles closely and use the source code target_system.erl it provides. I had used the way to do hot update and it worked well.

You were right that using custom target system (not initial) is the solution. Now hot updates work to me. Thanks for your help!

I just thought that using default (initital) Erlang system will be more convenient than creating target system by hand.

--
Sergey 
_______________________________________________
erlang-questions mailing list
[hidden email]
http://www.erlang.org/mailman/listinfo/erlang-questions
Loading...