Sentinel check to SDL CLI 'healthcheck' -command 06/7006/3
authorTimo Tietavainen <timo.tietavainen@nokia.com>
Sun, 7 Nov 2021 20:25:46 +0000 (22:25 +0200)
committerTimo Tietavainen <timo.tietavainen@nokia.com>
Mon, 8 Nov 2021 05:28:08 +0000 (07:28 +0200)
commit7c256b622c8fd065e91a7e289937d6e692a7eb1d
treee7a8402881cf044b7b18555346cb6ff3905d5235
parent977a55ca96d5dba1c7f9273671747eaf9cd6f894
Sentinel check to SDL CLI 'healthcheck' -command

In addition to the existing Redis master and slave healthiness
validation, add Redis sentinel healthiness validation to be done when
SDL CLI 'healthcheck' -command is ran. Validation is done by calling
Redis client's 'Sentinels' API call and parsing 'flags' field from its
output. In SDL CLI sentinel healthiness status is shown only if status
is not ok. This is done not to show too much information in CLI
interface for users.

Issue-Id: RIC-113

Signed-off-by: Timo Tietavainen <timo.tietavainen@nokia.com>
Change-Id: I8960ec9813e06aa88217c29bac56707b38052ae7
internal/cli/healthcheck.go
internal/cli/healthcheck_test.go
internal/sdlgoredis/dbstate.go
internal/sdlgoredis/dbstate_test.go
internal/sdlgoredis/sdlgoredis_test.go
internal/sdlgoredis/sdlgosentinel.go