Commit 97d19eeb authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

mysql_install_db script requires --basedir=${mariadb:location}.

parent d5565bb9
......@@ -124,6 +124,7 @@ class Recipe(GenericBaseRecipe):
self.options['wrapper'],
'%s.mysql.runMysql' % __name__,
[dict(
mysql_base_directory=self.options['mysql-base-directory'],
mysql_install_binary=self.options['mysql-install-binary'],
mysqld_binary=mysqld_binary,
data_directory=self.options['data-directory'],
......
......@@ -16,8 +16,9 @@ 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', '--datadir=%s' %
conf['data_directory']],
'--skip-name-resolve', '--no-defaults',
'--datadir=%s' % conf['data_directory'],
'--basedir=%s' % conf['mysql_base_directory']],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
result = popen.communicate()[0]
if popen.returncode is None or popen.returncode != 0:
......
......@@ -9,6 +9,7 @@ recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -9,6 +9,7 @@ recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -9,6 +9,7 @@ recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -9,6 +9,7 @@ recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -11,6 +11,7 @@ template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -11,6 +11,7 @@ template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -11,6 +11,7 @@ template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -9,6 +9,7 @@ recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -9,6 +9,7 @@ recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -56,6 +56,7 @@ innobackupex-full = ${rootdirectory:bin}/innobackupex-full
# Binary information
innobackupex-binary = {{ xtrabackup_location }}/bin/innobackupex
mysql-base-directory = {{ mariadb_location }}
mysql-binary = {{ mariadb_location }}/bin/mysql
mysql-install-binary = {{ mariadb_location }}/scripts/mysql_install_db
mysql-upgrade-binary = {{ mariadb_location }}/bin/mysql_upgrade
......
......@@ -67,7 +67,7 @@ context =
[template-mariadb]
< = template-jinja2-base
filename = instance-mariadb.cfg
md5sum = ed63ba0ba0ff123f4672ef6efbbb5be9
md5sum = bcaee4e52a4332451b15fb38ecb12a2b
extra-context =
key coreutils_location coreutils:location
key dcron_location dcron:location
......
......@@ -9,6 +9,7 @@ recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -9,6 +9,7 @@ recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -11,6 +11,7 @@ template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -9,6 +9,7 @@ recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -45,6 +45,7 @@ conf-file = $${rootdirectory:etc}/mariadb.cnf
backup-pending-directory = $${directory:mariadb-backup-pending}
# Binary information
mysql-base-directory = ${mariadb:location}
mysql-binary = ${mariadb:location}/bin/mysql
mysql-install-binary = ${mariadb:location}/scripts/mysql_install_db
mysql-upgrade-binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -86,7 +86,7 @@ mode = 0644
[instance-mariadb]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-mariadb.cfg
md5sum = 1d78084e3c768330a5c307c7eae6de20
md5sum = 135ad8e59a45e053f3aaf75deb35c5b0
output = ${buildout:directory}/template-mariadb.cfg
mode = 0644
......
......@@ -12,6 +12,7 @@ configuration = ${application-configuration:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -9,6 +9,7 @@ recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -9,6 +9,7 @@ recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -10,6 +10,7 @@ source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -11,6 +11,7 @@ template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -16,7 +16,7 @@ extends =
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = 035edf50db9215ac361afbb0532f432f
md5sum = a4e057ae406becc616a257931e321a88
output = ${buildout:directory}/template.cfg
mode = 0644
......
......@@ -11,6 +11,7 @@ template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -9,6 +9,7 @@ recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -11,6 +11,7 @@ template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -9,6 +9,7 @@ recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -10,6 +10,7 @@ source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -11,6 +11,7 @@ template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -9,6 +9,7 @@ recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -9,6 +9,7 @@ recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -9,6 +9,7 @@ recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -9,6 +9,7 @@ recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -9,6 +9,7 @@ recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -9,6 +9,7 @@ recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -10,6 +10,7 @@ source = ${application:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
httpd_binary = ${apache:location}/bin/httpd
mysql_base_directory = ${mariadb:location}
mysql_binary = ${mariadb:location}/bin/mysql
mysql_install_binary = ${mariadb:location}/scripts/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
......
......@@ -44,6 +44,7 @@ conf-file = $${rootdirectory:etc}/mariadb.cnf
promise = $${basedirectory:promises}/mysql
# Binary information
mysql-base-directory = ${mariadb:location}
mysql-binary = ${mariadb:location}/bin/mysql
mysql-install-binary = ${mariadb:location}/scripts/mysql_install_db
mysql-upgrade-binary = ${mariadb:location}/bin/mysql_upgrade
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment