Skip to content

Commit 220382a

Browse files
committed
MT#59588 scripts/commit add grants/creds sync support for 3308
* on carrier proxy nodes ngcp-sync-db-grants and ngcp-sync-db-creds are now also invoked for 127.0.0.1:3308 instance because table grants and user credentials are not replicated by default * change "Synchronizing MySQL grants/credentials" log string to "Synchronizing MariaDB grants/credentials" to better reflect that MariaDB is used as the database Change-Id: Ie4e77147621df34fc4e7f0e333183fb3b313f260 (cherry picked from commit 52605d6) (cherry picked from commit 7eff31a)
1 parent 64aa946 commit 220382a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/commit

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,15 @@ log_debug "${SCRIPTS}/etckeeper"
9191
"${SCRIPTS}"/etckeeper >/dev/null
9292

9393
if [ -z "${NO_DB_SYNC:-}" ] ; then
94-
log_info "Synchronizing MySQL grants/credentials"
94+
log_info "Synchronizing MariaDB grants/credentials"
9595
ngcp-sync-db-grants | sed "s/^/$timestamp_replacementchars/"
9696
ngcp-sync-db-creds | sed "s/^/$timestamp_replacementchars/"
97+
if [ "${NGCP_TYPE}" == "carrier" ] && [ "${NGCP_IS_PROXY}" == "yes" ] ; then
98+
. /etc/default/ngcp-db
99+
log_info "Synchronizing MariaDB grants/credentials for ${LOCAL_DBHOST}:${LOCAL_DBPORT}"
100+
ngcp-sync-db-grants --db-host "${LOCAL_DBHOST}" --db-port "${LOCAL_DBPORT}" --no-warnings | sed "s/^/$timestamp_replacementchars/"
101+
ngcp-sync-db-creds --db-host "${LOCAL_DBHOST}" --db-port "${LOCAL_DBPORT}" --no-warnings | sed "s/^/$timestamp_replacementchars/"
102+
fi
97103
else
98104
log_debug "no-db-sync: skipping 'ngcp-sync-db-grants' + 'ngcp-sync-db-creds'"
99105
fi

0 commit comments

Comments
 (0)