Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync:patch() looping #36

Open
Dryymoon opened this issue Jul 2, 2014 · 3 comments
Open

sync:patch() looping #36

Dryymoon opened this issue Jul 2, 2014 · 3 comments
Milestone

Comments

@Dryymoon
Copy link

Dryymoon commented Jul 2, 2014

I tryed use sync:patch on two nodes.
I change some source code on one node, and compiled code updates on first node, after on second node, next first node update code, next secnod node update code... I wait about 10 minutes and this loop wont stop.

FIRST NODE

???/src/servers/dbs.erl:0: Recompiled with 1 warnings
[sync_scanner:376] DEBUG - Nodes: ['root@s2.?.com']
[sync_scanner:381] DEBUG - Node: 'root@s2.?.com'

=INFO REPORT==== 2-Jul-2014::19:47:17 UTC ===
Reloading 'dbs' on root@s2.?.com.

=INFO REPORT==== 2-Jul-2014::19:47:17 UTC ===
dbs: Reloaded on 1 nodes! (Beam changed.)
[sync_scanner:376] DEBUG - Nodes: ['root@s2.?.com']
[sync_scanner:381] DEBUG - Node: 'root@s2.?.com'

=INFO REPORT==== 2-Jul-2014::19:47:20 UTC ===
Reloading 'dbs' on root@s2.?.com.

=INFO REPORT==== 2-Jul-2014::19:47:20 UTC ===
dbs: Reloaded on 1 nodes! (Beam changed.)
[sync_scanner:376] DEBUG - Nodes: ['root@s2.?.com']
[sync_scanner:381] DEBUG - Node: 'root@s2.?.com'

=INFO REPORT==== 2-Jul-2014::19:47:22 UTC ===
Reloading 'dbs' on root@s2.?.com.

=INFO REPORT==== 2-Jul-2014::19:47:22 UTC ===
dbs: Reloaded on 1 nodes! (Beam changed.)
[sync_scanner:376] DEBUG - Nodes: ['root@s2.?.com']
[sync_scanner:381] DEBUG - Node: 'root@s2.?.com'

=INFO REPORT==== 2-Jul-2014::19:47:24 UTC ===
Reloading 'dbs' on root@s2.?.com.

=INFO REPORT==== 2-Jul-2014::19:47:24 UTC ===
dbs: Reloaded on 1 nodes! (Beam changed.)

BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
(v)ersion (k)ill (D)b-tables (d)istribution
a

SECOND NODE

(root@s2.?.com)2> [sync_scanner:376] DEBUG - Nodes: ['root@s1.?.com']
[sync_scanner:381] DEBUG - Node: 'root@s1.?.com'

=INFO REPORT==== 2-Jul-2014::19:47:18 UTC ===
Reloading 'dbs' on root@s1.?.com.

=INFO REPORT==== 2-Jul-2014::19:47:18 UTC ===
dbs: Reloaded on 1 nodes! (Beam changed.)
[sync_scanner:376] DEBUG - Nodes: ['root@s1.?.com']
[sync_scanner:381] DEBUG - Node: 'root@s1.?.com'

=INFO REPORT==== 2-Jul-2014::19:47:20 UTC ===
Reloading 'dbs' on root@s1.?.com.

=INFO REPORT==== 2-Jul-2014::19:47:20 UTC ===
dbs: Reloaded on 1 nodes! (Beam changed.)
[sync_scanner:376] DEBUG - Nodes: ['root@s1.?.com']
[sync_scanner:381] DEBUG - Node: 'root@s1.?.com'

=INFO REPORT==== 2-Jul-2014::19:47:22 UTC ===
Reloading 'dbs' on root@s1.?.com.

=INFO REPORT==== 2-Jul-2014::19:47:22 UTC ===
dbs: Reloaded on 1 nodes! (Beam changed.)
[sync_scanner:376] DEBUG - Nodes: ['root@s1.?.com']
[sync_scanner:381] DEBUG - Node: 'root@s1.?.com'

=INFO REPORT==== 2-Jul-2014::19:47:24 UTC ===
Reloading 'dbs' on root@s1.?.com.

=INFO REPORT==== 2-Jul-2014::19:47:24 UTC ===
dbs: Reloaded on 1 nodes! (Beam changed.)
{nodedown,'root@s1.?.com'}

BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
(v)ersion (k)ill (D)b-tables (d)istribution
a

@choptastic
Copy link
Collaborator

Thanks for the report. I'll be honest, I'm not entirely sure how multi-node patching works, but my suspicion is that if sync is running on both nodes, sync will detect the updated beam.

If you haven't, I'd try to ensure sync is running only on one node (it can be installed, but I'd stop the sync scanner on other nodes with sync:stop())

ping @rustyio: your thoughts?

@Dryymoon
Copy link
Author

Dryymoon commented Jul 5, 2014

I deep learn this, and i found that for multipatching works - needs:

  1. On General node (only one), where sources is updated, need to sync:start() and sync:patch().
  2. On other nodes - only needs sync:start().
    And all wil work fine.
    Please update wiki for this detail.

@choptastic
Copy link
Collaborator

Thanks for researching this further, Igor. If you want, feel free to edit
the README with your findings, and I can merge those changes (giving you
the contribution credit and all the glories associated with it!)

It might be worthwhile, going forward to build a check into sync to check
if more than one node has patching turned on and throw an error if such is
detected.

-Jesse

On Sat, Jul 5, 2014 at 2:01 PM, Igor Pilipenko [email protected]
wrote:

I deep learn this, and i found that for multipatching works - needs:

  1. On General node (only one), where sources is updated, need to
    sync:start() and sync:patch().
  2. On other nodes - only needs sync:start().
    And all wil work fine.
    Please update wiki for this detail.


Reply to this email directly or view it on GitHub
#36 (comment).

Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm

@choptastic choptastic added this to the 1.0.0 milestone Oct 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants