Skip to content

Commit

Permalink
Merge pull request #29 from WyriHaximusNet/pass-STDERR-to--dev-null-w…
Browse files Browse the repository at this point in the history
…hen-getting-database-count

Pass STDERR to /dev/null when getting database count
  • Loading branch information
WyriHaximus authored Oct 15, 2022
2 parents 3dff3f6 + d1ee1a5 commit d240b27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engine/add.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ echo "${write} is write service"

(kubectl get secret -n "${namespace}" "${secret}")
if [[ "$?" == "1" ]] ; then
maxDatabases=$(((redis-cli -u "${write}" CONFIG GET databases | grep -v databases) | grep -q "ERR" && echo "16") || (redis-cli -u "${write}" CONFIG GET databases | grep -v databases))
maxDatabases=$(((redis-cli -u "${write}" CONFIG GET databases 2>/dev/null) | grep -q "ERR" && echo "16") || (redis-cli -u "${write}" CONFIG GET databases | grep -v databases))
redisServerIsKnown=$(kubectl get configmap redis-database-assignment-operator-in-use-dbs-list -o json | jq -r -c '.data.dbs' | jq -r ".\"${uri_host_port}\"" | wc -l)
if [[ "$redisServerIsKnown" == "1" ]] ; then
kubectl create configmap redis-database-assignment-operator-in-use-dbs-list --from-literal=dbs=$(kubectl get configmap redis-database-assignment-operator-in-use-dbs-list -o json | jq -r '.data.dbs' | jq -r ". * {\"${uri_host_port}\": {}}" | jq -c) --dry-run -o yaml | kubectl apply -f -
Expand Down

0 comments on commit d240b27

Please sign in to comment.