TT#33275 use --init-replication by default for ngcp-sync-db

* --init-replication is required now for the central-db
      because it uses multiple sources and they need to be
      readjusted after the data sync

Change-Id: I10c12d479dbe7d73e6e489d3aa9ab37b7216af54
changes/00/24500/1
Kirill Solomko 7 years ago
parent f724d97f94
commit 422af529f0

@ -250,10 +250,10 @@ if $RUN_SYNC_DB && ($NOT_REPLICATED_REV_APPLIED || [ -n "$AUTOMATED_INSTALL_MODE
PRX_SYNC_DBS="ngcp billing carrier kamailio provisioning prosody mysql"
EXTRA_SYNC_DB_OPTS=""
if [ -n "$AUTOMATED_INSTALL_MODE" ] ; then
EXTRA_SYNC_DB_OPTS="--local-user=root --init-replication --set-local-grants"
EXTRA_SYNC_DB_OPTS="--local-user=root --set-local-grants"
fi
# shellcheck disable=SC2086
if /usr/sbin/ngcp-sync-db --verbose --force --use-central-db --repl-mode "master-slave" --databases "${PRX_SYNC_DBS}" --ssh-tunnel=33125 ${EXTRA_SYNC_DB_OPTS} --local-host=${LOCAL_DBHOST} --local-port=${LOCAL_DBPORT}; then
if /usr/sbin/ngcp-sync-db --verbose --force --use-central-db --repl-mode "master-slave" --init-replication --databases "${PRX_SYNC_DBS}" --ssh-tunnel=33125 ${EXTRA_SYNC_DB_OPTS} --local-host=${LOCAL_DBHOST} --local-port=${LOCAL_DBPORT}; then
echo "Syncing 'not_replicated' statements from the central node."
else
echo "Error: While syncing 'not_replicated' statements from the central node, please run ngcp-sync-db-wrapper manually to fix them." >&2

Loading…
Cancel
Save