google / seesaw

Seesaw v2 is a Linux Virtual Server (LVS) based load balancing platform.
Apache License 2.0
5.63k stars 511 forks source link

Failed to add VIP #46

Closed driftavalii closed 5 years ago

driftavalii commented 5 years ago

Unable to start seesaw_engine and checking /var/log/seesaw/seesaw_engine.INFO, I get the error F0102 23:51:23.323436 2584 vserver.go:1359] server.br11@kvm.test: failed to add VIP 10.240.11.65: IP run "addr add 10.240.11.65/24 brd 10.240.11.255 dev ens4": exit status 2 seesaw.cfg is:

[cluster]
anycast_enabled = false
name = seesaw-br11
node_ipv4 = 10.240.11.42
peer_ipv4 = 10.240.11.41
vip_ipv4 = 10.240.11.65

[interface]
node = ens3
lb = ens4

ip addr show:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:54:00:0b:fd:27 brd ff:ff:ff:ff:ff:ff
    inet 10.240.11.42/24 brd 10.240.11.255 scope global ens3
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fe0b:fd27/64 scope link 
       valid_lft forever preferred_lft forever
3: ens4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:00:5e:00:01:3c brd ff:ff:ff:ff:ff:ff
    inet 10.240.11.65/24 brd 10.240.11.255 scope global ens4
       valid_lft forever preferred_lft forever
4: dummy0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether c6:28:2b:65:89:b0 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::c428:2bff:fe65:89b0/64 scope link 
       valid_lft forever preferred_lft forever

systemctl status seesaw_watchdog:

seesaw_watchdog.service - Seesaw v2 watchdog
   Loaded: loaded (/etc/systemd/system/seesaw_watchdog.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2019-01-02 23:51:15 EST; 8min ago
 Main PID: 2486 (seesaw_watchdog)
    Tasks: 44 (limit: 2362)
   CGroup: /system.slice/seesaw_watchdog.service
           ├─2486 /usr/local/seesaw/seesaw_watchdog
           ├─2503 seesaw_ncc -log_dir=/var/log/seesaw
           ├─2510 seesaw_ecu -log_dir=/var/log/seesaw
           ├─2518 seesaw_healthcheck -log_dir=/var/log/seesaw
           └─2945 seesaw_ha -log_dir=/var/log/seesaw

Is there any guides with regards to interface configuration.

baptr commented 5 years ago

vip_ipv4 in the config is meant to be the IP shared between two seesaws in a HA cluster. The software expects to add and manage the IP as determined by the HA process.

It looks like you already have that IP address on the device, which may be what the engine is complaining about.

Try removing the IP from ens4 and trying again.

driftavalii commented 5 years ago

Doesn't seem to change the outcome. cat seesaw_engine.INFO

Log file created at: 2019/01/03 03:14:40
Running on machine: seesaw-2
Binary: Built with gc go1.10.4 for linux/amd64
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
I0103 03:14:40.810338    1428 core.go:121] Seesaw Engine starting for seesaw-br11
W0103 03:14:40.926290    1428 notifier.go:214] Failed to load cluster config from peer: configFromPeer not implemented
I0103 03:14:40.928724    1428 core.go:352] Received cluster config notification; config from disk (/etc/seesaw/cluster.pb) at 2019-01-03 03:14:40.928648151 -0500 EST m=+0.134600452
I0103 03:14:40.933839    1428 notifier.go:123] Configuration notifier started
I0103 03:14:40.934654    1428 server.go:81] Removing stale socket /var/run/seesaw/engine/engine.sock
F0103 03:14:40.956236    1428 vserver.go:1359] server.br11@kvm.test: failed to add VIP 10.240.11.65: IP run "addr add 10.240.11.65/24 brd 10.240.11.255 dev ens4": exit status 2

ip addr show

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:54:00:0b:fd:27 brd ff:ff:ff:ff:ff:ff
    inet 10.240.11.42/24 brd 10.240.11.255 scope global ens3
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fe0b:fd27/64 scope link 
       valid_lft forever preferred_lft forever
3: ens4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:00:5e:00:01:3c brd ff:ff:ff:ff:ff:ff
    inet 10.240.11.65/24 brd 10.240.11.255 scope global ens4
       valid_lft forever preferred_lft forever
4: dummy0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether e6:23:8b:ca:03:72 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::e423:8bff:feca:372/64 scope link 
       valid_lft forever preferred_lft forever

It complains if there's no dummy interface configured but it doesn't seem to have any impact. Does the load balanced service need to be running?

thinh2610 commented 2 years ago

Have you fixed the above error yet? I also got the same error