13 Security Lab

[SETUP] Seesaw / Google Load Balancing Open SW / Google GO based 본문

Computer Science/linux - wiki

[SETUP] Seesaw / Google Load Balancing Open SW / Google GO based

Maj0r Tom 2016. 4. 4. 22:00

Seesaw v2 is a Linux Virtual Server (LVS) based load balancing platform.


[Reference]
GO 공식 사이트 : https://golang.org/doc/install
GO 설치 한국블로그 : http://blog.iolate.kr/207

[SETUP]

SEESAW_BIN="/usr/local/go/bin"
SEESAW_ETC="/etc/seesaw"
SEESAW_LOG="/var/log/seesaw"

install -d "${SEESAW_BIN}" "${SEESAW_ETC}" "${SEESAW_LOG}"
install "${GOPATH}/bin/seesaw_cli" /usr/bin/seesaw for component in {ecu,engine,ha,healthcheck,ncc,watchdog}; do install "${GOPATH}/bin/seesaw_${component}" "${SEESAW_BIN}" done install "etc/init/seesaw_watchdog.conf" "/etc/init"
install "etc/seesaw/watchdog.cfg" "${SEESAW_ETC}" # Enable CAP_NET_RAW for seesaw binaries that require raw sockets.
/sbin/setcap cap_net_raw+ep "/usr/local/go/src/github.com/google/seesaw/binaries/seesaw_ha"
/sbin/setcap cap_net_raw+ep "/usr/local/go/src/github.com/google/seesaw/binaries/seesaw_healthcheck"

[!trouble shooting]
>> sudo /sbin/setcap cap_net_raw+ep "/usr/local/go/src/github.com/google/seesaw/binaries/seesaw_ha"
Failed to set capabilities on file `/usr/local/go/src/github.com/google/seesaw/binaries/seesaw_ha' (Invalid argument)
The value of the capability argument is not permitted for a file. Or the file is not a regular (non-symlink) file

<!Solution (from Stack-Overflow)>
sudo /sbin/setcap cap_net_raw+ep $(readlink -f /usr/local/go/src/github.com/google/seesaw/binaries/seesaw_ha)

<Solution (Code13)>
error message said "The value of the capability argument is not permitted for a file. Or the file is not a regular (non-symlink) file"
위 경로의 seesaw_ha, seesaw_healthcheck 는 파일이 아닌 디렉토리 -> 실제 설정 적용 가능한 ELF 파일은 "/usr/local/go/bin" 에 있음...
>> SEESAW_BIN=/usr/local/go/bin
>> /sbin/setcap cap_net_raw+ep "${SEESAW_BIN}/seesaw_ha"
>> /sbin/setcap cap_net_raw+ep "${SEESAW_BIN}/seesaw_healthcheck"

[!trouble shooting2]

[go가 설치된 위치에서] + 만약에 패키지의 /usr/bin/go 와 
수동설치 된 /usr/local/go/bin/go 가 겹치는지 확인한다



[!trouble shooting3]

Seesaw 프로젝트를 /usr/local/go/src/github.com/google 아래로 옮겨야 함.
옮긴 후 Full Path 1 : /usr/local/go/src/github.com/google/seesaw$
Full Path 1 아래 seesaw 파일 들 : 
./binaries/seesaw_ncc
./binaries/seesaw_healthcheck
./binaries/seesaw_cli
./binaries/seesaw_watchdog
./binaries/seesaw_ecu
./binaries/seesaw_ha
./binaries/seesaw_engine
./etc/init/seesaw_watchdog.conf


Comments