Demystify server-id offset.

This commit is contained in:
Anthony Yeh 2016-11-18 11:19:15 -08:00 committed by Devin Donnelly
parent ee4ad16cc3
commit b36a613ae3
1 changed files with 1 additions and 0 deletions

View File

@ -23,6 +23,7 @@ spec:
# Generate mysql server-id from pod ordinal index.\n
[[ `hostname` =~ -([0-9]+)$ ]] || exit 1\n
echo [mysqld] > /mnt/conf.d/server-id.cnf\n
# Add an offset to avoid reserved server-id=0 value.\n
echo server-id=$((100 + ${BASH_REMATCH[1]})) >> /mnt/conf.d/server-id.cnf\n
"],
"volumeMounts": [