|
|
@@ -356,14 +356,25 @@ def check_if_ready_for_barracuda(): |
|
|
|
}.items(): |
|
|
|
|
|
|
|
if mariadb_variables.get(key) != value: |
|
|
|
print "="*80 |
|
|
|
print "Please add this to MariaDB's my.cnf and restart MariaDB before proceeding" |
|
|
|
print |
|
|
|
print expected_config_for_barracuda |
|
|
|
print "="*80 |
|
|
|
site = frappe.local.site |
|
|
|
msg = ("Creation of your site - {x} failed because MariaDB is not properly {sep}" |
|
|
|
"configured to use the Barracuda storage engine. {sep}" |
|
|
|
"Please add the settings below to MariaDB's my.cnf, restart MariaDB then {sep}" |
|
|
|
"run `bench new-site site17.local` again.{sep2}" |
|
|
|
"").format(x=site, sep2="\n"*2, sep="\n") |
|
|
|
|
|
|
|
print_db_config(msg, expected_config_for_barracuda) |
|
|
|
sys.exit(1) |
|
|
|
# raise Exception, "MariaDB needs to be configured!" |
|
|
|
|
|
|
|
|
|
|
|
def print_db_config(explanation, config_text): |
|
|
|
print ("="*80) |
|
|
|
print (explanation) |
|
|
|
print (config_text) |
|
|
|
print ("="*80) |
|
|
|
|
|
|
|
|
|
|
|
def extract_sql_gzip(sql_gz_path): |
|
|
|
try: |
|
|
|
subprocess.check_call(['gzip', '-d', '-v', '-f', sql_gz_path]) |
|
|
|