[Linux-HA] Annouce: IPAddr2 RA v1.30 alpha

Michael Schwartzkopff misch at multinet.de
Tue Apr 10 03:12:11 MDT 2007


Am Dienstag, 10. April 2007 10:59 schrieb Lars Marowsky-Bree:
> > @@ -143,6 +154,15 @@
> >  <content type="string" default=""/>
> >  </parameter>
> >
> > +<parameter name="load_share">
> > +<longdesc lang="en">
> > +Enable load sharing via clusterip target of iptables. Be sure to have
> > +iptables with clusterip target compiled in.
> > +</longdesc>
> > +<shortdesc lang="en">Enable load sharing</shortdesc>
> > +<content type="boolean" default="false"/>
> > +</parameter>
> > +
>
> The old script tried to auto-detect that it was run as a clone and then
> automatically enabled this, which I think is still preferable. If the
> CRM_meta_clone{,_max} show up in the environment, it should switch into
> this mode by itself. No need for an additional parameter.

At the moment I would like to have that parameter since interop between LVS 
and CLUSTERIP is not tested at all. After these tests we can drop it.

>
> > @@ -285,10 +286,17 @@
> >  	    LVS_SUPPORT=1
> >  	fi
> >
> > -	IP_INC_GLOBAL=${OCF_RESKEY_incarnations_max_global:-1}
> > -	IP_INC_NO=${OCF_RESKEY_incarnation_no:-0}
> > -	IP_CIP_HASH="$OCF_RESKEY_clusterip_hash"
> > -	IP_CIP_MARK=${OCF_RESKEY_clusterip_mark:-1}
> > +	LOAD_SHARE=0
> > +	if [ x"${OCF_RESKEY_load_share}" = x"true" \
> > +            -o x"${OCF_RESKEY_load_share}" = x"on" \
> > +            -o x"${OCF_RESKEY_load_share}" = x"1" \
> > +	    -o x"${OCF_RESKEY_load_share}" = x"yes" ]; then
> > +            LOAD_SHARE=1
> > +        fi
> > +
> > +	IP_INC_GLOBAL=${OCF_RESKEY_CRM_meta_clone_max:-1}
> > +	IP_INC_NO=$((OCF_RESKEY_CRM_meta_clone+1))
> > +	IP_CIP_HASH="${OCF_RESKEY_clusterip_hash}"
>
> Yes, turns out the instance parameters were renamed since ;-) Thanks for
> catching this.
>
> You sure about the "clone+1"? I thought hash buckets, too, were numbered
> from 0 on.

Hash buckets are numbered from 1 on.

>
> > -	if [ "$IP_INC_GLOBAL" -gt 1 ]; then
> > +	if [ "$IP_INC_GLOBAL" -gt 1 -a $LOAD_SHARE -gt 0 ]; then
> > +		ocf_log info "user wants load share"
>
> I think this change can be skipped for the reasons given above.

I'd like to have it. Reasons see above.

>
> > @@ -582,16 +596,7 @@
> >  	fi
> >
> >  	if [ -n "$IP_CIP" ] && [ $ip_status = "no" ]; then
> > -		$MODPROBE ip_tables
> >  		$MODPROBE ip_conntrack
> > -		$MODPROBE ipt_CLUSTERIP
> > -		$IPTABLES -A OUTPUT -s $BASEIP -o $NIC \
> > -				-m state --state NEW \
> > -				-j CONNMARK --set-mark $IP_CIP_MARK
>
> You removed the connmark upstream completely. Did this become obsolete
> upstream?
CLUSTERIP always did work without marking. If you mark the pakets all hashes 
will be handled only from one node (hash=1).

>
> > @@ -662,16 +667,15 @@
> >  		fi
> >  		echo "-$IP_INC_NO" >$IP_CIP_FILE
> >  		if [ "x$(cat $IP_CIP_FILE)" = "x" ]; then
> > -			# This was the last incarnation
> > -			$IPTABLES -D OUTPUT -s $CLUSTERIP -o $NIC \
> > -					-m state --state NEW \
> > -					-j CONNMARK --set-mark $IP_CIP_MARK
> > +			ocf_log info $BASEIP, $IP_CIP_HASH
> >  			$IPTABLES -D INPUT -d $BASEIP -i $NIC -j CLUSTERIP \
> >  					--new \
> >  					--clustermac $IF_MAC \
> >  					--total-nodes $IP_INC_GLOBAL \
> >  					--local-node $IP_INC_NO \
> >  					--hashmode $IP_CIP_HASH
> > +			$MODPROBE -r ipt_CLUSTERIP
> > +			$MODPROBE -r ip_conntrack
>
> I'd advise against rmmod. Removing modules isn't entirely supported on
> Linux.

Due to kernel crash I'd like to remove the module. Anyway, somebody who likes 
to have CLUSTERIP will know what he does and will have a distro where module 
removal is supported.

(...)

> Thanks for the changes. If we can
> clarify the changes above, we should be able to merge it asap.

Please test it extensively. I only checked it my me two virtual machines with 
up to 12 clone instances. No LVS cross check, no backward compatibility.

At the moment I am working on a locking mechanism during resource start. So 
the restriction of a ordered clone would not be nescessary any more. But this 
needs some more conceptual changes in ip_start and ip_stop.

-- 
Dr. Michael Schwartzkopff
MultiNET Services GmbH
Addresse: Bretonischer Ring 7; 85630 Grasbrunn; Germany
Tel: +49 - 89 - 45 69 11 0
Fax: +49 - 89 - 45 69 11 21
mob: +49 - 174 - 343 28 75

mail: misch at multinet.de
web: www.multinet.de

Sitz der Gesellschaft: 85630 Grasbrunn
Registergericht: Amtsgericht München HRB 114375
Geschäftsführer: Günter Jurgeneit, Hubert Martens

---

PGP Fingerprint: F919 3919 FF12 ED5A 2801 DEA6 AA77 57A4 EDD8 979B
Skype: misch42


More information about the Linux-HA mailing list