Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos-caddy
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
Guillaume Hervier
slapos-caddy
Commits
bb8ab8ae
Commit
bb8ab8ae
authored
Mar 28, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a mysql_tzinfo_to_sql wrapper for mariadb and remove --no-default param
parent
047b844d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
12 deletions
+17
-12
slapos/recipe/generic_mysql/mysql.py
slapos/recipe/generic_mysql/mysql.py
+3
-3
software/mariadb/instance-mariadb.cfg
software/mariadb/instance-mariadb.cfg
+1
-1
software/mariadb/software.cfg
software/mariadb/software.cfg
+1
-1
stack/erp5/buildout.cfg
stack/erp5/buildout.cfg
+3
-3
stack/erp5/instance-mariadb.cfg.in
stack/erp5/instance-mariadb.cfg.in
+9
-4
No files found.
slapos/recipe/generic_mysql/mysql.py
View file @
bb8ab8ae
...
...
@@ -17,7 +17,7 @@ def runMysql(args):
# XXX: Protect with proper root password
# XXX: Follow http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html
popen
=
subprocess
.
Popen
([
conf
[
'mysql_install_binary'
],
'--skip-name-resolve'
,
'--no-defaults'
,
'--skip-name-resolve'
,
'--datadir=%s'
%
conf
[
'data_directory'
],
'--basedir=%s'
%
conf
[
'mysql_base_directory'
]],
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
)
...
...
@@ -52,7 +52,7 @@ def updateMysql(args):
while
True
:
mysql_upgrade_list
=
[
conf
[
'mysql_upgrade_binary'
],
'--user=root'
]
if
'socket'
in
conf
:
mysql_upgrade_list
.
insert
(
1
,
'--no-defaults'
)
mysql_upgrade_list
.
insert
(
1
)
mysql_upgrade_list
.
append
(
'--socket='
+
conf
[
'socket'
])
mysql_upgrade
=
subprocess
.
Popen
(
mysql_upgrade_list
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
)
result
=
mysql_upgrade
.
communicate
()[
0
]
...
...
@@ -67,7 +67,7 @@ def updateMysql(args):
print
"No need to upgrade MySQL database"
mysql_list
=
[
conf
[
'mysql_binary'
].
strip
(),
'-B'
,
'--user=root'
]
if
'socket'
in
conf
:
mysql_list
.
insert
(
1
,
'--no-defaults'
)
mysql_list
.
insert
(
1
)
mysql_list
.
append
(
'--socket='
+
conf
[
'socket'
])
mysql
=
subprocess
.
Popen
(
mysql_list
,
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
)
...
...
software/mariadb/instance-mariadb.cfg
View file @
bb8ab8ae
...
...
@@ -53,7 +53,7 @@ mysqld-binary = ${mariadb:location}/bin/mysqld
mysqldump-binary = ${mariadb:location}/bin/mysqldump
gzip-binary = $${buildout:gzip-binary}
zcat-binary = ${gzip:location}/bin/zcat
mysql-tzinfo-to-sql-binary = ${mariadb:location}/bin/mysql_tzinfo_to_sql
[certificate-authority]
recipe = slapos.cookbook:certificate_authority
...
...
software/mariadb/software.cfg
View file @
bb8ab8ae
...
...
@@ -48,7 +48,7 @@ mode = 0644
[instance-mariadb]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-mariadb.cfg
md5sum =
d160bb15d8d3a3913706a4ed29c49388
md5sum =
79f86f8c74335b2b9ec81d6a02164cbf
output = ${buildout:directory}/template-mariadb.cfg
mode = 0644
...
...
stack/erp5/buildout.cfg
View file @
bb8ab8ae
...
...
@@ -146,7 +146,7 @@ mode = 640
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = erp5
branch = erp5
-cluster
git-executable = ${git:location}/bin/git
[check-recipe]
...
...
@@ -184,7 +184,7 @@ context =
[template-mariadb]
< = download-base
filename = instance-mariadb.cfg.in
md5sum =
1d202667c98a5bcc448eb5f61cbbf1e3
md5sum =
8f4883b0b3f01515a2e3b9ed59f55497
[template-zope]
< = download-base
...
...
@@ -287,7 +287,7 @@ extra-context =
[template-erp5-single]
< = download-base
filename = instance-erp5-single.cfg.in
md5sum =
d35e94974cd4cb8838e205a96f5ec0ba
md5sum =
69961d8b60ce529baaf958dc76537ac5
[template-erp5-cluster]
< = download-base
...
...
stack/erp5/instance-mariadb.cfg.in
View file @
bb8ab8ae
...
...
@@ -89,9 +89,10 @@ context = section parameter_dict init-script-parameters
[update-mysql]
recipe = slapos.cookbook:generic.mysql.wrap_update_mysql
output = ${directory:services}/mariadb_update
binary = ${binary-wap-mysql_upgrade:output}
binary = ${binary-w
r
ap-mysql_upgrade:output}
mysql = ${binary-wrap-mysql:output}
init-script = ${init-script:rendered}
mysql_tzinfo_to_sql = ${binary-wrap-mysql_tzinfo_to_sql:output}
[mysqld]
recipe = slapos.cookbook:generic.mysql.wrap_mysqld
...
...
@@ -130,7 +131,7 @@ state-file = ${directory:srv}/logrotate.status
recipe = slapos.cookbook:logrotate.d
name = mariadb
log = ${my-cnf-parameters:error-log} ${my-cnf-parameters:slow-query-log}
post = "${binary-wrap-mysql:output}" -
-no-defaults -
B -u root -e "FLUSH LOGS"
post = "${binary-wrap-mysql:output}" -B -u root -e "FLUSH LOGS"
[cron]
recipe = slapos.cookbook:cron
...
...
@@ -182,9 +183,13 @@ command = mysql
< = binary-wrap-base
command = mysqldump
[binary-wap-mysql_upgrade]
[binary-w
r
ap-mysql_upgrade]
< = binary-wrap-base
command-line = mysql_upgrade
command = mysql_upgrade
[binary-wrap-mysql_tzinfo_to_sql]
< = binary-wrap-base
command = mysql_tzinfo_to_sql
[directory]
recipe = slapos.cookbook:mkdirectory
...
...
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