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

Can't install seesaw #128

Closed erdanilevicius closed 1 year ago

erdanilevicius commented 1 year ago

Hello,

I've tried quite a few things trying to install and setup seesaw load balancer, unfortunately when doing "Make test" I get few fails on "go test ./" task.

For the background I tried in ubuntu 22.04 and ubuntu 20.04 servers, now I'm at ubuntu 22.04, go language is installed from apt packages instead of downloading it from github. All attempts ended with the same output. $Path is declared, seesaw directory is under go directory itself too, but I can't figure it out why I can't make this work, am I doing something wrong?

here's th eoutput of make test. Thank you for help, advice in advance.

root@testtest:/usr/lib/go-1.18/src/github.com/google/seesaw# make test go build ./... go test ./...

github.com/google/seesaw/common/conn

common/conn/ipc.go:97:9: github.com/google/seesaw/common/ipc.ConfigSource composite literal uses unkeyed fields common/conn/rpc.go:107:9: github.com/google/seesaw/common/ipc.ConfigSource composite literal uses unkeyed fields

github.com/google/seesaw/cli

cli/show.go:190:12: github.com/google/seesaw/common/seesaw.NodesByIPv4 composite literal uses unkeyed fields cli/state.go:50:40: github.com/google/seesaw/common/seesaw.VserverOverride composite literal uses unkeyed fields ? github.com/google/seesaw/binaries/seesaw_cli [no test files] ? github.com/google/seesaw/binaries/seesaw_ecu [no test files] ? github.com/google/seesaw/binaries/seesaw_engine [no test files] ? github.com/google/seesaw/binaries/seesaw_ha [no test files] ? github.com/google/seesaw/binaries/seesaw_healthcheck [no test files] ? github.com/google/seesaw/binaries/seesaw_ncc [no test files] ? github.com/google/seesaw/binaries/seesaw_watchdog [no test files] ok github.com/google/seesaw/common/ipc (cached) ok github.com/google/seesaw/common/seesaw (cached) ok github.com/google/seesaw/engine 8.916s ok github.com/google/seesaw/engine/config (cached)

github.com/google/seesaw/ha

ha/engine_client.go:77:49: github.com/google/seesaw/common/ipc.HAState composite literal uses unkeyed fields ha/engine_client.go:96:50: github.com/google/seesaw/common/ipc.HAStatus composite literal uses unkeyed fields FAIL github.com/google/seesaw/ha [build failed] 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 0x0, 0x0, 0x14, 0x0, 0x3, 0x0, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0x0, 0x4, 0x0, 0x50, 0x0, 0x0, 0x0, 0x8, 0x0, 0x6, 0x0, 0x77, 0x6c, 0x63, 0x0, 0xc, 0x0, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x9, 0x0, 0xff, 0xff, 0xff, 0xff} FAIL FAIL github.com/google/seesaw/netlink 0.004s ok github.com/google/seesaw/quagga (cached) make: *** [Makefile:25: test] Error 2

hazaelsan commented 1 year ago

The composite literal uses unkeyed fields errors make me think you're using an older version of go, what's the output of go version?

The test failures are because you're using a newer version of libnl which uses NLA_F_NESTED now. I'll send a fix shortly, but for now you can swap the 23rd byte in the affected tests from 0x000x80.

erdanilevicius commented 1 year ago

The composite literal uses unkeyed fields errors make me think you're using an older version of go, what's the output of go version?

I had tried latest version I can get from apt repositories on freshly installed ubuntu 22.04, and 20.04, and I've also tried downloading latest from source. I rebuilt those servers, but I believe that from apt I'm getting 1.18+ and from source I'm getting 1.20 golang version.

hazaelsan commented 1 year ago

Fix is in #130.

Looks like the lines about composite literal keys are warnings from go vet and can be ignored.