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

Seesaw.cfg Configuration Server functionality #100

Closed DefenceLogic closed 4 years ago

DefenceLogic commented 4 years ago

Dear Sirs,

In the seeswaw.cfg you enable the following

[config_server]
primary = lb1.<domain fqdn>
secondary = lb2.<domain fqdn>

In the /var/log/seesaw/seesaw_engine.INFO log you get

W0728 15:14:34.870323    5083 fetcher.go:186] Fetch failed: fetch failed from https://lb1.<domain fqdn>l:10255/config/defencelogic-lb (172.16.4.163): dial tcp 172.16.4.163:10255: connect: connection refused
W0728 15:14:34.870672    5083 fetcher.go:186] Fetch failed: fetch failed from https://lb2.<domain fqdn>:10255/config/defencelogic-lb (172.16.4.164): dial tcp 172.16.4.164:10255: connect: connection refused
E0728 15:14:34.870683    5083 notifier.go:159] Failed to pull configuration: all config server requests failed

Is there a way to disable this functionality as it does not seem to affect seesaw's operation? Alternatively, can someone point in the direction of some documentation on how to set this feature up?

Any help appreciated.

liuyuan10 commented 4 years ago

unfortunately the config source is hardcoded to server today,. You can follow the code to see how to set up a config server: https://github.com/google/seesaw/blob/67eba17cffd346e0d616e7972307c64d15662693/engine/config/notifier.go#L299

Other alternatives: https://github.com/google/seesaw/blob/67eba17cffd346e0d616e7972307c64d15662693/cli/core.go#L75

seesaw_cli has a command to set config source. I didn't try it but you can try it out to change it: $ config source disk

DefenceLogic commented 4 years ago

This works only after you have started the seesaw_watchdog service, the command needed is

/usr/bin/seesaw -c " config source disk"

I moved my compiled seesaw_cli to /usr/bin/seesaw as part of my build.

W0730 15:52:31.028663   11624 fetcher.go:186] Fetch failed: fetch failed from https://lb2.<domain fqdn>:10255/config/defencelogic-lb (172.16.4.164): dial tcp 172.16.4.164:10255: connect: connection refused
E0730 15:52:31.028674   11624 notifier.go:159] Failed to pull configuration: all config server requests failed
I0730 15:53:12.054469   11624 notifier.go:141] Checking for config changes...
I0730 15:53:12.054685   11624 notifier.go:173] No config changes found
I0730 15:53:31.027717   11624 notifier.go:141] Checking for config changes...
I0730 15:53:31.028043   11624 notifier.go:173] No config changes found
I0730 15:54:31.027741   11624 notifier.go:141] Checking for config changes...

Thank You