|
|
@ -88,3 +88,19 @@ else |
|
|
|
exit 14 |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
major_version=${version%.*} |
|
|
|
|
|
|
|
## XXXvlab: why don't we do this initialisation in init ? |
|
|
|
cmd="db.adminCommand( { setFeatureCompatibilityVersion: \"${major_version}\" } )" |
|
|
|
debug "${WHITE}running:$NORMAL $cmd" |
|
|
|
|
|
|
|
out=$(ddb < <(echo "use $DBNAME"; |
|
|
|
echo "$cmd")) |
|
|
|
if [[ "$out" == *"\"ok\" : 1"* ]]; then |
|
|
|
info "Feature Compatibility set to ${major_version}. " |
|
|
|
else |
|
|
|
err "Failed to set feature compatibieplicaSet initialisation failed:" |
|
|
|
echo "$out" | prefix " | " >&2 |
|
|
|
exit 13 |
|
|
|
fi |