azynheira / distel

Automatically exported from code.google.com/p/distel
0 stars 0 forks source link

backend loading causes amnesia #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. select a erlang node with c-c c-d n
2. try any action. it will fail because backend modules are not loaded.
3. backend modules are loaded (such an excellent feature)
4. nothing.

What is the expected output? What do you see instead?
after loading, the action should be retried.

Please use labels and text to provide additional information.
from *Messages*;

load: [badrpc [EXIT [undef ([distel rpc_entry (distel reload_modules nil)]
[rpc -handle_call/3-fun-0- 5])]]]
...
(Successfully uploaded backend modules into node)

  <here i wuld like to see the reload_modules retried>

  alas, i'm not enough of a lisper to feel any kind of confidence that i
can hack this. luke? or is it not implemented because it's really hard?

Original issue reported on code.google.com by mats.cro...@gmail.com on 17 May 2007 at 10:52

GoogleCodeExporter commented 8 years ago
  perhaps one should check if the backend is loaded before rtrying the action in the
first place?

Original comment by mats.cro...@gmail.com on 17 May 2007 at 10:54

GoogleCodeExporter commented 8 years ago
I've posted a proposed patch for this on the mailing list:
http://article.gmane.org/gmane.comp.lang.erlang.distel.devel/134

Please have a look at it and let me know if this fixes the issue for you.

Original comment by billc...@gmail.com on 26 Jun 2007 at 10:46

GoogleCodeExporter commented 8 years ago
bill's fix works for me.

Original comment by mats.cro...@gmail.com on 5 Jul 2007 at 11:50

GoogleCodeExporter commented 8 years ago
Following discussion on the mailing list, it was decided that the patch 
shouldn't be 
in erl-choose-nodename since that function can be run before the node is 
actually 
started. Instead, the patch was put into a new function (erl-ping). 

So, to prevent the issue from occuring, you have the following options:

1. Put the path to the distel ebin directory in the .erlang file in all the 
nodes 
that you connect to (as documented in the INSTALL file). That way, distel will 
automatically be visible to all nodes.
2. Connect to a node with "C-c C-d n" and subsequently do a "C-c C-d g" to load 
the 
distel modules into the node.
3. Connect to a node and also load the distel modules using "C-u C-c C-d g".

Really, the distel code should be loaded into a node automatically when a 
distel 
command attempts to communicate with the node; however, there appears to be a 
race 
condition that is preventing this from working properly the first time a 
command is 
run. Therefore, until this is fixed, any of the above 3 options will do the job.

Original comment by billc...@gmail.com on 5 Jul 2007 at 3:20

GoogleCodeExporter commented 8 years ago
erl-ping works around this. no one understands/cares enough about this to fix 
the
real problem (a race condition in code loading vs. erlang distribution 
handshaking?)

Original comment by mats.cro...@gmail.com on 26 Jun 2008 at 8:02