Closed chendo closed 9 years ago
On further investigation, this is due to Google Cloud assigning us as a /32 as they don't support broadcast/multicast on their network, so rand.Intn is being passed -1.
The ability to override the subnet mask should fix this issue
Hmm, why would GCE assign a /32 mask? Is it some special network setup that you've configured? And if so, may I ask the rational behind it? I could try and figure out a workaround, but it seems to me a very strange use case.
I believe it's meant to prevent you from using broadcast/multicast, rather than silently not work. I don't believe we're using a special setup, just a standard GCE VM. I found it strange to be honest, but I guess it's better to fail noisily rather than silently.
I've been using GCE quite a lot a while back, but then the default net mask was I believe /8 (that's the reason I found the /32 a bit strange).
However you are completely right, that Iris should at least display a proper error message and not just panic, so I'll definitely need to fix this. I'm not sure I would like to support configuring custom net masks as it would beat the current zero configuration "promise" (it's not that simple... what happens when multiple networks are present?).
Nonetheless I will investigate this /32 subnet issue, as if it's something newly introduced into GCE, that I'd definitely want to know about it and its rationale.
I had the same problem on a machine with multiple interfaces. One had a /32 subnet and causes the panic. For that situation where the broadcast can be done via another interface, a warning would be good enough for me.
Yes, I agree that the panic should be sorted out. I'm just finishing up the JVM binding, after which I'll sort this out asap :)... but in the mean time, if you feel up to it, you could write up a small pull request to ignore /32 subnets ;)
Well, I've created a pull request for a fix of that issue.
The panic is gone now, but I'm not exactly sure whether I should allow the bootstrapper to be started at all on such addresses (<2 bit host part). They are used primarily by bridges (/32) or point-to-point connections (/31), and in neither case should the bootstrapper have anything to look for. For now it issues a warning and stops probing, but maybe I'll also add a check into an upper layer to never even start a bootstrapper in the first place.
Iris panics when trying to probe.
eth0 details: