On 2010-01-06T15:21:53, Jiaju Zhang <[email protected]> wrote:
> I have done some testing to the patch, it works as expected. So I
> regenerate this patch based on the current tip of resource agents
> repository. Attched is the "hg export" of it.
Good job! Let's get this polished soon!
Some feedback:
> +<parameter name="tickle_dir" unique="0" required="0">
> +<longdesc lang="en">
> +The shared directory which stores the established TCP connections.
> +</longdesc>
> +<shortdesc lang="en">Tickle directory</shortdesc>
> +<content type="string" default="" />
> +</parameter>
> +
> +<parameter name="sync_script" unique="0" required="0">
> +<longdesc lang="en">
> +The script used for synchronizing TCP connection state file, such as
> +csync2, some wrapper of rsync, or whatever.
> +</longdesc>
> +<shortdesc lang="en">File sync script</shortdesc>
> +<content type="string" default="" />
> +</parameter>
I'm just wondering; the original idea was to use OpenAIS CKPT
segments or something similar to synchronize the connection state across
nodes, why was this abandoned in favor of a file-based solution?
That said, I'm fine with using a file if it keeps up the performance.
But the sync_script - we definitely don't want to be calling an external
script, I guess. csync2 would be automatic anyway.
> +save_tcp_connections()
> +{
> + [ -z "$OCF_RESKEY_tickle_dir" ] && return
> + statefile=$OCF_RESKEY_tickle_dir/$OCF_RESKEY_ip
> + netstat -tn |egrep '^tcp.*ESTABLISHED' |awk '{print $4" "$5}' |
> + while read server client; do
> + ipaddr=${server%:*}
> + [ "$ipaddr" == "$OCF_RESKEY_ip" ] && echo $server
> $client
> + done |
> + dd of="$statefile".new conv=fsync && mv "$statefile".new
> "$statefile"
> + [ -n "$OCF_RESKEY_sync_script" ] && $OCF_RESKEY_sync_script $statefile
> +}
> +
> +run_tickle_tcp()
> +{
> + [ -z "$OCF_RESKEY_tickle_dir" ] && return
> + echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle
> + f=$OCF_RESKEY_tickle_dir/$OCF_RESKEY_ip
> + [ -f $f ] && cat $f | $TICKLETCP -n 3
> }
Oh. This is quite costly, is it not? Scanning the full TCP connection
table and regenerating the whole lease-file?
How does this scale?
Is there really no interface by which we can be notified when TCP
connections get established and deleted?
How is this done in Samba?
Regards,
Lars
--
Architect Storage/HA, OPS Engineering, Novell, Inc.
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
"Experience is the name everyone gives to their mistakes." -- Oscar Wilde
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/