sync
sync copied to clipboard
sync:patch() looping
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
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?
I deep learn this, and i found that for multipatching works - needs:
- On General node (only one), where sources is updated, need to sync:start() and sync:patch().
- On other nodes - only needs sync:start(). And all wil work fine. Please update wiki for this detail.
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:
- On General node (only one), where sources is updated, need to sync:start() and sync:patch().
- 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 https://github.com/rustyio/sync/issues/36#issuecomment-48093910.
Jesse Gumm Owner, Sigma Star Systems 414.940.4866 || sigma-star.com || @jessegumm