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
Alain Takoudjou
slapos
Commits
b6c4bef6
Commit
b6c4bef6
authored
Feb 09, 2015
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! erp5: mariadb import script: kill mysqld process in trap.
parent
7e3123c6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
stack/erp5/buildout.cfg
stack/erp5/buildout.cfg
+2
-2
stack/erp5/instance-mariadb.cfg.in
stack/erp5/instance-mariadb.cfg.in
+1
-1
stack/erp5/template/instance-mariadb-resiliency-after-import-script.sh.in
...ate/instance-mariadb-resiliency-after-import-script.sh.in
+4
-2
No files found.
stack/erp5/buildout.cfg
View file @
b6c4bef6
...
@@ -150,13 +150,13 @@ context =
...
@@ -150,13 +150,13 @@ context =
[mariadb-resiliency-after-import-script]
[mariadb-resiliency-after-import-script]
recipe = slapos.recipe.build:download
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/template/instance-mariadb-resiliency-after-import-script.sh.in
url = ${:_profile_base_location_}/template/instance-mariadb-resiliency-after-import-script.sh.in
md5sum =
5a300e69a5984cd0e4f5fe91c0c54aac
md5sum =
ea8ce40667827b16dbc642a73aca89f8
mode = 755
mode = 755
[template-mariadb]
[template-mariadb]
recipe = slapos.recipe.build:download
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-mariadb.cfg.in
url = ${:_profile_base_location_}/instance-mariadb.cfg.in
md5sum =
f8da9d6bb5da207d3ecadf2bba499616
md5sum =
a5f9888bd882331c35d48f05e468a0a2
mode = 640
mode = 640
[template-zope]
[template-zope]
...
...
stack/erp5/instance-mariadb.cfg.in
View file @
b6c4bef6
...
@@ -209,7 +209,7 @@ recipe = collective.recipe.template
...
@@ -209,7 +209,7 @@ recipe = collective.recipe.template
input = {{ mariadb_resiliency_after_import_script }}
input = {{ mariadb_resiliency_after_import_script }}
output = ${rootdirectory:srv}/runner-import-restore
output = ${rootdirectory:srv}/runner-import-restore
mode = 755
mode = 755
dash
_location = {{ dash_location }}
dash
= {{ dash_location }}/bin/dash
[rootdirectory]
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
...
...
stack/erp5/template/instance-mariadb-resiliency-after-import-script.sh.in
View file @
b6c4bef6
#!
{{ dash_location }
}
#!
${:dash
}
# DO NOT RUN THIS SCRIPT ON PRODUCTION INSTANCE
# DO NOT RUN THIS SCRIPT ON PRODUCTION INSTANCE
# OR MYSQL DATA WILL BE ERASED.
# OR MYSQL DATA WILL BE ERASED.
...
@@ -10,6 +10,8 @@
...
@@ -10,6 +10,8 @@
# Depending on the output, it will create a file containing
# Depending on the output, it will create a file containing
# the status of the restoration (success or failure)
# the status of the restoration (success or failure)
set -e
mysql_executable="${mariadb-instance:mysql-binary}"
mysql_executable="${mariadb-instance:mysql-binary}"
mysqldump_executable="${binary-wrap-mysqldump:wrapper-path}"
mysqldump_executable="${binary-wrap-mysqldump:wrapper-path}"
mariadb_data_directory="${directory:mariadb-data}"
mariadb_data_directory="${directory:mariadb-data}"
...
@@ -28,7 +30,7 @@ if [ -e "$pid_file" ]; then
...
@@ -28,7 +30,7 @@ if [ -e "$pid_file" ]; then
fi
fi
echo "Deleting existing database..."
echo "Deleting existing database..."
rm -r $mariadb_data_directory/*
rm -r $mariadb_data_directory/*
>/dev/null 2>&1 || true
echo "Adapting binlog database to new paths..."
echo "Adapting binlog database to new paths..."
new_binlog_directory="$(dirname $binlog_path)"
new_binlog_directory="$(dirname $binlog_path)"
...
...
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