I think I’ve run into some kind of unexpected behaviour today. Or maybe it’s some kind of unsupported configuration. Anyway, I thought I’d better bring this to the forum just in case.
Devices A and B are introducers for each other (I know this sounds weird, but it makes good sence in my case), and B is also introducer for device C. A folder that’s shared between these devices also needed to be shared with device D (not initially known to either of the three). The discovering and sharing was done by device B, so device D got introduced to A and C - as planned.
Later the need emerged for D to be removed from the swarm. Since it was introduced by B, the GUI on A and C wouldn’t allow it to be removed (because it would then be reintroduced). Makes sence.
While A was powered down for maintenance, I removed D from device B. Device C promptly removed D, too, because no other folders were shared between C and D. So far, so good, and everything works like clockwork. But then device A came online…
Both A and B went offline for the rest of the swarm. For the next hour, one of them would occasionally pop online only to disappear in the next 10 seconds. Then I got curious and started investigation.
I looked like as soon as A would connect to B, it would try to drop D that was no longer introduced, but at the same moment B would pick up D as introduction from A. Then B would seem to “remember” (this is the moment I didn’t quite understand, mostly because I didn’t have online access to B’s logs) that D was just dropped and re-drop D, but by that time the fact that list of devices changed on both A and B they would both drop all connections and start re-scanning the folder. By the time they’re done they’re back to square one: A knows D is introduced by B for this folder, and B knows D is dropped. Then they connect to each other and the dance repeats, ad infinitum.
I ended up walking to B and unchecking A (so that it would no longer be an introducer), waiting a minute for everything to settle down and checking A back into introducer again. Issue was solved.
But it got me thinking: why would B re-drop D that got “re-introduced” to it by A? Why this endless loop? And what would happen in case of a longer introducer ring chain (i.e. J is introducer for K, K for L, L for M, M for J)… Can’t wait till weekend to have time to fire up some VMs and test!