[lvs-users] maintenance on fallback node

Oscar Salvador osalvador.vilardaga at gmail.com
Fri Apr 10 09:16:44 BST 2015

Hi everybody!

I was testing some things with LVS, and some questions raised. Let me

Imagine we have two mysql-servers(or whatever), and we want a setup
Then we have the following config:

quiescent = no
maintenancedir = /var/run/ldirectord-downed-hosts/

        real=xx.xx.xx.XY:3306 gate
        fallback=xx.xx.xx.YX:3306 gate
        request="show status;"

So, when from some site I connect to xx.xx.xx.xx:3306, and when xx.xx.xx.XY
becomes unavailable for some reason, real-server is deleted and
fallback-server goes up.
I can force that with a:
touch /var/run/ldirectord-downed-hosts/xx.xx.xx.XY, then xx.xx.xx.YX comes

But now there is something I don't understand quite well.
Imagine I'm doing some maintenance in the fallback node: xx.xx.xx.YX

I though that maybe just doing:

touch /var/run/ldirectord-downed-hosts/xx.xx.xx.YX

lvs would detect that the fallback-server is not accesible, so it only has
the real-server.
But then, if the real-servers goes down for some reason(just imagine a
voluntary 'server mysql stop'), lvs will delete the real-server and put
fallback-server in its side.
But that is a problem from my point of view, because I do not want do mess
with fallback-server while I'm doing some maintenance.

Actually the same aproach is like:

When xx.xx.xx.XY is alive:

TCP  xx.xx.xx.xx:3306 wlc
  -> xx.xx.xx.XY:3306          Route   1      0          4

Then if we stop mysql from xx.xx.xx.XY, xx.xx.xx.YX becomes available :

TCP  xx.xx.xx.xx:3306 wlc
  -> xx.xx.xx.YX:3306          Route   1      0          4

But if I stop mysql from xx.xx.xx.YX, nothign is happening, lvs does not
delete xx.xx.xx.YX from the server lists.

Maybe I'm doind something wrong?

thank you very much

More information about the lvs-users mailing list