Dears, I wanted to have LVS VIP additionally to the DNS round-robin load balancing. I have configured the following files on all my CTDB nodes: /etc/ctdb/lvs_nodes: [root at fs01 ctdb]# cat lvs_nodes 10.254.94.11 10.254.94.12 10.254.94.13 10.254.94.14 10.254.94.15 10.254.94.16 Those are internal IPs for the CTDB cluster (also used for GlusterFS internal traffic). /etc/ctdb/script.options: # 91.lvs CTDB_LVS_PUBLIC_IFACE=bridge0 CTDB_LVS_PUBLIC_IP=10.46.68.30 [root at fs01 ctdb]# onnode all ctdb scriptstatus>> NODE: 10.254.94.11 <<[...] 91.lvs OK 0.004 Thu Dec 15 14:03:45 2022>> NODE: 10.254.94.12 <<[...] 91.lvs OK 0.005 Thu Dec 15 14:03:56 2022>> NODE: 10.254.94.13 <<[...] 91.lvs OK 0.005 Thu Dec 15 14:03:48 2022>> NODE: 10.254.94.14 <<[...] 91.lvs OK 0.005 Thu Dec 15 14:03:48 2022>> NODE: 10.254.94.15 <<[...] 91.lvs OK 0.005 Thu Dec 15 14:03:53 2022>> NODE: 10.254.94.16 <<[...] 91.lvs OK 0.005 Thu Dec 15 14:04:05 2022 [root at fs01 ctdb]# ctdb lvs list 0 10.254.94.11 1 10.254.94.12 2 10.254.94.13 3 10.254.94.14 4 10.254.94.15 5 10.254.94.16 [root at fs01 ctdb]# ctdb lvs status pnn:0 10.254.94.11 OK (THIS NODE) pnn:1 10.254.94.12 OK pnn:2 10.254.94.13 OK pnn:3 10.254.94.14 OK pnn:4 10.254.94.15 OK pnn:5 10.254.94.16 OK But actually, nothing happens. [root at fs01 ctdb]# ipvsadm IP Virtual Server version 1.2.1 (size=4096) Prot LocalAddress:Port Scheduler Flags -> RemoteAddress:Port Forward Weight ActiveConn InActConn [root at fs01 ctdb]# What I'm missing here? -- Leszek A. Szczepanowski twinsen at mspanc.net
Hi Leszek, On Thu, 15 Dec 2022 14:07:58 +0100, Leszek Szczepanowski via samba <samba at lists.samba.org> wrote:> I wanted to have LVS VIP additionally to the DNS round-robin load balancing. > I have configured the following files on all my CTDB nodes: > > /etc/ctdb/lvs_nodes: > > [root at fs01 ctdb]# cat lvs_nodes > 10.254.94.11 > 10.254.94.12 > 10.254.94.13 > 10.254.94.14 > 10.254.94.15 > 10.254.94.16 > > Those are internal IPs for the CTDB cluster (also used for GlusterFS > internal traffic). > > /etc/ctdb/script.options: > > # 91.lvs > CTDB_LVS_PUBLIC_IFACE=bridge0 > CTDB_LVS_PUBLIC_IP=10.46.68.30> [...]> But actually, nothing happens. > > [root at fs01 ctdb]# ipvsadm > IP Virtual Server version 1.2.1 (size=4096) > Prot LocalAddress:Port Scheduler Flags > -> RemoteAddress:Port Forward Weight ActiveConn InActConn > [root at fs01 ctdb]# > > What I'm missing here?I think you probably also need to set: CTDB_LVS_NODES=/etc/ctdb/lvs_nodes If that doesn't work and if there is nothing in the logs, then... Given that this is only handled by an event script, the best way to debug might be to add "set -x" near the top of /etc/ctdb/events/legacy/91.lvs.script and see what you find in the logs. Note that, although CTDB's LVS support has some tests in the CTDB test suite and I have hand-tested it in the past, I don't know of anyone else who is using it. You may find interesting things, including bugs. Please let us know if it works... peace & happiness, martin