I think you are getting a new cookie because of how your openais/etc is failing over, not haproxy. haproxy doesn't create the cookie it just passes it along.

drbd/openais doesn't have a way to maintain the same tcp connection id across failovers (AFAIK), so when you fail over you get a new tcp connection. You have to ask the openais/pacemaker/etc experts if the php sessions/cookies are being replicated across all the servers and if so, how would phpmyadmin get the list of cookies from the failed server.

On 9/21/09 2:46 AM, Stefan wrote:
Hello all :)

I have a pacemaker, openais, drbd, mysql, haproxy running but dont get the
session failover running. Haproxy runs also on the cluster, I want to access
phpmyadmin without to relogin when there is a failover. I set the session path
in php.ini to a directory on drbd device. The session data is there. Also
after failover. But I have to relogin when haproxy fails over and I get a new
cookie.

my config:

global
         log 127.0.0.1   local0
         log 127.0.0.1   local1 notice
         #log loghost    local0 info
         maxconn 4096
         #debug
         #quiet
         user haproxy
         group haproxy

defaults
         log     global
         mode    http
         option  httplog
         option  dontlognull
         retries 3
         redispatch
         maxconn 2000
         contimeout      5000
         clitimeout      50000
         srvtimeout      50000

listen webfarm 10.100.100.200:80
        mode http
#        cookie webfarm insert
        stats enable
        stats auth someuser:somepassword
        balance roundrobin
        cookie cluster-phpmyadmin prefix
        option httpclose
        option forwardfor
        option httpchk HEAD /check.txt HTTP/1.0
        server cluster 10.100.100.200:81 cookie cluster check


can someone help?

tia
stefan


Reply via email to