Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
slapos
Commits
11ec4e2d
Commit
11ec4e2d
authored
Sep 11, 2019
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5: remove redundant mysql --user argument
parent
d2d4e989
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
stack/erp5/buildout.hash.cfg
stack/erp5/buildout.hash.cfg
+3
-3
stack/erp5/instance-mariadb-resiliency-after-import-script.sh.in
...rp5/instance-mariadb-resiliency-after-import-script.sh.in
+1
-1
stack/erp5/instance-mariadb-start-clone-from-backup.sh.in
stack/erp5/instance-mariadb-start-clone-from-backup.sh.in
+5
-5
stack/erp5/instance-mariadb.cfg.in
stack/erp5/instance-mariadb.cfg.in
+2
-2
No files found.
stack/erp5/buildout.hash.cfg
View file @
11ec4e2d
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
# not need these here).
# not need these here).
[mariadb-resiliency-after-import-script]
[mariadb-resiliency-after-import-script]
filename = instance-mariadb-resiliency-after-import-script.sh.in
filename = instance-mariadb-resiliency-after-import-script.sh.in
md5sum =
aff3bb574c8f0a2db9911fee30540e12
md5sum =
85ce1e2f3d251aa435fef8118dca8a63
[mariadb-slow-query-report-script]
[mariadb-slow-query-report-script]
filename = mysql-querydigest.sh.in
filename = mysql-querydigest.sh.in
...
@@ -22,11 +22,11 @@ md5sum = 0c0d98a68230cd0ad36046bb25b35f4a
...
@@ -22,11 +22,11 @@ md5sum = 0c0d98a68230cd0ad36046bb25b35f4a
[mariadb-start-clone-from-backup]
[mariadb-start-clone-from-backup]
filename = instance-mariadb-start-clone-from-backup.sh.in
filename = instance-mariadb-start-clone-from-backup.sh.in
md5sum = d
95e8500bdc72d1f40b97cc414656e7e
md5sum = d
10b8e35b02b5391cf46bf0c7dbb1196
[template-mariadb]
[template-mariadb]
filename = instance-mariadb.cfg.in
filename = instance-mariadb.cfg.in
md5sum =
b29449652ef996c267518e4dcfd8e9e1
md5sum =
0eb2f45a145dde0c59d3488bfdbe66ff
[template-kumofs]
[template-kumofs]
filename = instance-kumofs.cfg.in
filename = instance-kumofs.cfg.in
...
...
stack/erp5/instance-mariadb-resiliency-after-import-script.sh.in
View file @
11ec4e2d
...
@@ -59,7 +59,7 @@ fi
...
@@ -59,7 +59,7 @@ fi
echo "Importing data..."
echo "Importing data..."
# Use latest dump XXX can contain funny characters
# Use latest dump XXX can contain funny characters
dump=$(ls -r "$mariadb_backup_directory" | head -1)
dump=$(ls -r "$mariadb_backup_directory" | head -1)
zcat "$mariadb_backup_directory/$dump" | $mysql_executable
-u root
|| {
zcat "$mariadb_backup_directory/$dump" | $mysql_executable || {
RESTORE_EXIT_CODE=$?
RESTORE_EXIT_CODE=$?
echo 'Backup restoration failed.'
echo 'Backup restoration failed.'
exit $RESTORE_EXIT_CODE
exit $RESTORE_EXIT_CODE
...
...
stack/erp5/instance-mariadb-start-clone-from-backup.sh.in
View file @
11ec4e2d
...
@@ -84,16 +84,16 @@ done
...
@@ -84,16 +84,16 @@ done
"$UPDATE"
"$UPDATE"
echo "Importing $BACKUP ..."
echo "Importing $BACKUP ..."
zcat "$BACKUP" | "$CLIENT"
-u root
zcat "$BACKUP" | "$CLIENT"
echo "Configuring server as slave..."
echo "Configuring server as slave..."
if [ "$MASTER_USE_GTID" -eq 1 ]; then
if [ "$MASTER_USE_GTID" -eq 1 ]; then
"$CLIENT" -
u root -
e "$SQL_SET_GTID"
"$CLIENT" -e "$SQL_SET_GTID"
MASTER_USE_GTID_SQL="slave_pos"
MASTER_USE_GTID_SQL="slave_pos"
else
else
MASTER_USE_GTID_SQL="NO"
MASTER_USE_GTID_SQL="NO"
fi
fi
"$CLIENT" -
u root -
e "
"$CLIENT" -e "
CHANGE MASTER TO
CHANGE MASTER TO
MASTER_HOST='$MASTER_HOST',
MASTER_HOST='$MASTER_HOST',
MASTER_USER='$MASTER_USER',
MASTER_USER='$MASTER_USER',
...
@@ -111,9 +111,9 @@ if [ "$MASTER_USE_GTID" -eq 0 ]; then
...
@@ -111,9 +111,9 @@ if [ "$MASTER_USE_GTID" -eq 0 ]; then
# Notes:
# Notes:
# - Must happen after setting MASTER_HOST & MASTER_PORT.
# - Must happen after setting MASTER_HOST & MASTER_PORT.
# - Implicitly sets MASTER_USE_GTID=NO if it was set before.
# - Implicitly sets MASTER_USE_GTID=NO if it was set before.
"$CLIENT" -
u root -
e "$SQL_CHANGE_MASTER"
"$CLIENT" -e "$SQL_CHANGE_MASTER"
fi
fi
"$CLIENT" -
u root -
e "START SLAVE;"
"$CLIENT" -e "START SLAVE;"
echo "Stopping mariadb..."
echo "Stopping mariadb..."
trap EXIT
trap EXIT
...
...
stack/erp5/instance-mariadb.cfg.in
View file @
11ec4e2d
...
@@ -107,7 +107,7 @@ time = {{ dumps(backup_periodicity) }}
...
@@ -107,7 +107,7 @@ time = {{ dumps(backup_periodicity) }}
# can be fully restored.
# can be fully restored.
# master-data: use value "2" as we are not in a replication case
# master-data: use value "2" as we are not in a replication case
#}
#}
command = "${binary-wrap-mysqldump:wrapper-path}" -
u root -
-all-databases --flush-privileges --single-transaction --max-allowed-packet=128M {% if incremental_backup_retention_days > -1 %}--flush-logs --master-data=2 {% endif %}| {{ parameter_dict['gzip-location'] }}/bin/gzip > "${directory:mariadb-backup-full}/$({{ parameter_dict['coreutils-location'] }}/bin/date "+%Y%m%d%H%M%S").sql.gz"
command = "${binary-wrap-mysqldump:wrapper-path}" --all-databases --flush-privileges --single-transaction --max-allowed-packet=128M {% if incremental_backup_retention_days > -1 %}--flush-logs --master-data=2 {% endif %}| {{ parameter_dict['gzip-location'] }}/bin/gzip > "${directory:mariadb-backup-full}/$({{ parameter_dict['coreutils-location'] }}/bin/date "+%Y%m%d%H%M%S").sql.gz"
{# KEEP GLOB PATTERN IN SYNC with generated filenames above
{# KEEP GLOB PATTERN IN SYNC with generated filenames above
# YYYYmmddHHMMSS -#}
# YYYYmmddHHMMSS -#}
file-glob = ??????????????.sql.gz
file-glob = ??????????????.sql.gz
...
@@ -206,7 +206,7 @@ context = section parameter_dict odbc-ini-text
...
@@ -206,7 +206,7 @@ context = section parameter_dict odbc-ini-text
< = logrotate-entry-base
< = logrotate-entry-base
name = mariadb
name = mariadb
log = ${my-cnf-parameters:error-log} ${my-cnf-parameters:slow-query-log}
log = ${my-cnf-parameters:error-log} ${my-cnf-parameters:slow-query-log}
post = "${binary-wrap-mysql:wrapper-path}" -B -
u root -
e "FLUSH LOGS"
post = "${binary-wrap-mysql:wrapper-path}" -B -e "FLUSH LOGS"
[{{ section('binary-link') }}]
[{{ section('binary-link') }}]
recipe = slapos.cookbook:symbolic.link
recipe = slapos.cookbook:symbolic.link
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment