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

Question: Why is TestAnycastHost (192.168.255.254) being advertised? #26

Closed lasse-aagren closed 8 years ago

lasse-aagren commented 8 years ago

Hi,

By looking into seesaw I found that regardsless how simple your cluster.pb is, TestAnycastHost defined in:

https://github.com/google/seesaw/blob/master/common/seesaw/util.go#L31

used in:

https://github.com/google/seesaw/blob/master/engine/config/engine.go#L48

gets BGP advertised as long as you have anycast_enabled = true in seesaw.cfg.

Is this intentional, and if so ,why is it needed?

#/var/log/seesaw$ grep Anycast *
seesaw_engine.INFO:I0816 13:58:41.262759    3038 core.go:304] Advertising BGP route for 192.168.255.254 (Anycast)
seesaw_engine.lb1.root.log.INFO.20160816-123109.39631:I0816 12:31:10.014840   39631 core.go:304] Advertising BGP route for 192.168.255.254 (Anycast)
seesaw_engine.lb1.root.log.INFO.20160816-135841.3038:I0816 13:58:41.262759    3038 core.go:304] Advertising BGP route for 192.168.255.254 (Anycast)
baptr commented 8 years ago

https://github.com/google/seesaw/blob/master/engine/config/engine.go#L85 documents that they're always advertised.

We use them for monitoring - to be able to confirm that BGP advertisements are propagating and such.

But they do need to be configurable.

Currently https://github.com/google/seesaw/blob/master/binaries/seesaw_engine/main.go#L151 only adds to what's hard-coded in the defaults. It should be ok to remove those defaults and allow anyone who wants the same functionality to specify that in the config.

lasse-aagren commented 8 years ago

So if I would like to anycast an IP from other segment than 192.168.255.0/24 I need to change:

https://github.com/google/seesaw/blob/master/common/seesaw/util.go#L31

(or add extra_service_anycast to seesaw.cfg) and change:

https://github.com/google/seesaw/blob/master/common/seesaw/util.go#L28

(or fix the code to make it configurable :)) ?

lasse-aagren commented 8 years ago

answered