[Spread-users] Spread rollout to lots of machines

George Schlossnagle george at omniti.com
Mon Feb 2 13:26:36 EST 2004


On Feb 2, 2004, at 12:41 PM, Matt Sergeant wrote:
> That's definitely not the intention. I want one segment per "rack" (we
> call them "towers", but it's basically a 19" rack full of servers).
>
> The solution I've come up with is this RPM post install script:
>
> %post
> if ! grep -q '# Tower' /etc/spread.conf; then
> perl -e '$data = qx(/sbin/ifconfig eth0 | grep "inet addr");
> ($ip, $bcast) = $data =~ /inet
> addr:\s*(\d+\.\d+\.\d+\.\d+)\s+Bcast:\s*(\d+\.\d+\.\d+\.\d+)/i;
> ($rhs, $tower, $server) = $ip =~ /^(\d+\.\d+)\.(\d+)\.(\d+)$/;
> @range = ($server < 128) ? (1..127) : (128..254);
> print "# Tower $tower\nSpread_Segment $bcast:4803 {\n";
> print "\tserver-$_  $rhs.$tower.$_\n" foreach (@range);
> print "}\n\n";' >> /etc/spread.conf
> fi
>
> It looks a bit hacky, but I think it'll work just fine.

I had a similar problem a couple years ago.  Given that running local 
/24's is so common, it's rather frustrating that the ring is limited to 
128 participants.

George

// George Schlossnagle
// Postal Engine -- http://www.postalengine.com/
// Ecelerity: fastest MTA on earth





More information about the Spread-users mailing list