Files
moxious d01da69d55 [stable/neo4j]Neo4j 4.0 Support (#21896)
* update to 4.0.2, add APOC flag

Signed-off-by: Moxious <moxious@oldhat.org>

* add APOC install toggle

Signed-off-by: Moxious <moxious@oldhat.org>

* APOC install toggle & clustering changes

Signed-off-by: Moxious <moxious@oldhat.org>

* documentation additions

Signed-off-by: Moxious <moxious@oldhat.org>

* read replica 4.0 cluster configuration

Signed-off-by: Moxious <moxious@oldhat.org>

* update chart version & maintainers

Signed-off-by: Moxious <moxious@oldhat.org>

* WIP

Signed-off-by: Moxious <moxious@oldhat.org>

* LIST discovery type for cluster formation

Signed-off-by: Moxious <moxious@oldhat.org>

* publish unready addresses, and expose HTTPS

Signed-off-by: Moxious <moxious@oldhat.org>

* add "defaultDatabase" setting

Signed-off-by: Moxious <moxious@oldhat.org>

* update Neo4j

Signed-off-by: Moxious <moxious@oldhat.org>

* version compatibility and parameters

Signed-off-by: Moxious <moxious@oldhat.org>

* fixes #21439 allow custom configuration of neo4j

Signed-off-by: Moxious <moxious@oldhat.org>

* updated nice output on launch

Signed-off-by: Moxious <moxious@oldhat.org>

* fixed replica dbms.mode

Signed-off-by: Moxious <moxious@oldhat.org>

* hints for initContainers

Signed-off-by: Moxious <moxious@oldhat.org>

* n.b. about pod readiness and DNS

Signed-off-by: Moxious <moxious@oldhat.org>

* add a service to address read replica pods

Signed-off-by: Moxious <moxious@oldhat.org>

* correct advertisement addresses for replicas

Signed-off-by: Moxious <moxious@oldhat.org>

* initContainers documentation

Signed-off-by: Moxious <moxious@oldhat.org>

* update tests for Neo4j 4.0 cypher change

Signed-off-by: Moxious <moxious@oldhat.org>

* cluster can run with 2 members at runtime to permit 1 failure

Signed-off-by: Moxious <moxious@oldhat.org>

* differentiate between overrideable and non-overridable settings

Signed-off-by: Moxious <moxious@oldhat.org>

* listen on all network interfaces

Signed-off-by: Moxious <moxious@oldhat.org>

* increase e2e test timeout for longer cluster formation

Signed-off-by: Moxious <moxious@oldhat.org>

* Modified test endpoints for 4.0

Signed-off-by: Moxious <moxious@oldhat.org>

* Test iteration

Signed-off-by: Moxious <moxious@oldhat.org>

* use curl since wget doesn't support --post-data in this CI server

Signed-off-by: Moxious <moxious@oldhat.org>

* continued testing iteration

Signed-off-by: Moxious <moxious@oldhat.org>

* attempt post via netcat to see if busybox supports it

Signed-off-by: Moxious <moxious@oldhat.org>

* Remove old wget approach

Signed-off-by: Moxious <moxious@oldhat.org>

* fix test script

Signed-off-by: Moxious <moxious@oldhat.org>

* testing error

Signed-off-by: Moxious <moxious@oldhat.org>

* change statefulset api -> v1 for compat

Signed-off-by: Moxious <moxious@oldhat.org>

* Add OWNERS file

Signed-off-by: Moxious <moxious@oldhat.org>
2020-05-07 10:55:09 -07:00

39 lines
1.4 KiB
Bash

#!/bin/bash
NS="${RELEASE_NAMESPACE:-default}"
STATEFULSET_NAME="${RELEASE_NAME:-neo4j}-neo4j"
NEO4J_SECRETS_PASSWORD=$(kubectl get secret -n ${NS} ${RELEASE_NAME}-neo4j-secrets -o jsonpath='{.data.neo4j-password}' | base64 --decode)
CORE_REPLICAS=${REPLICAS:-3}
echo "Testing we can get the cluster role of each server in statefulset ${STATEFULSET_NAME} in namespace: ${NS}"
check_role() {
name=$1
end="$((SECONDS+600))"
while true; do
echo "checking cluster role: ${name} for systemdb"
# In Neo4j 4.0 members now only have a cluster role with respect to a particular database.
kubectl exec ${name} -n ${NS} -- bin/cypher-shell -a ${name} -u neo4j -p ${NEO4J_SECRETS_PASSWORD} "call dbms.cluster.role('system')" 2>/dev/null
response_code=$?
[[ "0" = "$response_code" ]] && break
[[ "${SECONDS}" -ge "${end}" ]] && exit 1
echo "waiting for connection to pod: ${name}"
sleep 5
done
}
for num in $(seq $CORE_REPLICAS); do
id=$(expr $num - 1)
name="${STATEFULSET_NAME}-core-$id"
echo "checking role of $name for systemdb"
check_role $name
done
# kill a machine and make sure it comes back again
machine_to_kill="${STATEFULSET_NAME}-core-0"
echo "Testing recovery after failed/deleted pod"
echo "Deleting pod: ${machine_to_kill}"
kubectl delete pod ${machine_to_kill} -n ${NS}
check_role ${machine_to_kill}
echo "Pod recovered successfully!"