Merge pull request #1647 from tgruben/core-527

[CORE-527] multi-node to single backup check
This commit is contained in:
tgruben 2021-07-01 15:17:19 -05:00 committed by GitHub
commit 7740036717
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 3 deletions

View file

@ -62,6 +62,25 @@ services:
PILOSA_STORAGE_BACKEND: ${PILOSA_STORAGE_BACKEND:-rbf}
volumes:
- data:/data
pilosax:
image: build/pilosa
build:
context: .
dockerfile: Dockerfile.pilosa
environment:
PILOSA_ADVERTISE: pilosax:10101
PILOSA_ADVERTISE_GRPC: pilosax:20101
PILOSA_CLUSTER_REPLICAS: 1
PILOSA_DATA_DIR: /data/pilosax
PILOSA_ETCD_ADVERTISE_CLIENT_ADDRESS: http://pilosax:10201
PILOSA_ETCD_ADVERTISE_PEER_ADDRESS: http://pilosax:10301
PILOSA_ETCD_INITIAL_CLUSTER: pilosax=http://pilosax:10301
PILOSA_ETCD_LISTEN_CLIENT_ADDRESS: http://0.0.0.0:10201
PILOSA_ETCD_LISTEN_PEER_ADDRESS: http://0.0.0.0:10301
PILOSA_NAME: pilosax
PILOSA_STORAGE_BACKEND: ${PILOSA_STORAGE_BACKEND:-rbf}
volumes:
- data:/data
client1:
image: tgruben/bash
build:

View file

@ -19,9 +19,17 @@ curl -X DELETE -s pilosa0:10101/index/sink
/pilosa restore -s backupdir --host pilosa0:10101
after=$(/pilosa chksum --host pilosa0:10101)
if [ "$before" = "$after" ]; then
echo "PASS"
exit 0
echo "PASS Cluster"
else
echo "FAIL"
echo "FAIL Single"
exit 1
fi
/pilosa restore -s backupdir --host pilosax:10101
single=$(/pilosa chksum --host pilosax:10101)
if [ "$before" = "$single" ]; then
echo "PASS Single"
exit 0
else
echo "FAIL Single"
exit 1
fi