factorial-io / phabalicious

Supports your deployments and every-day devops-tasks
http://docs.phab.io
MIT License
18 stars 3 forks source link

Unknown suffix '$' used for variable 'max_allowed_packet' #317

Closed joachim-n closed 12 months ago

joachim-n commented 12 months ago

In the bicom-instances repo I did:

phab get:sql-dump --config bi-com-careers-qa

I got this:

 // Dumping database of `bi-com-careers-qa` ...

Unknown suffix '$' used for variable 'max_allowed_packet' (value '${MARIADB_MAX_ALLOWED_PACKET:-64M}')
Warning: option 'max_allowed_packet': unsigned value 0 adjusted to 4096
mysqldump: Error while setting value '${MARIADB_MAX_ALLOWED_PACKET:-64M}' to 'max_allowed_packet'

In CommandResult.php line 56:

  `cd /app/docroot/sites/default && ( mysqldump --no-tablespaces -u bi-com-_YQblc -h mariadb-0f88e55c-5d54-4
  547-80be-baa8e910413e --port 3306 -p’XXXXXXXXXX' bi-com-careers-qa_76Ew6 --add-drop-table --
  no-autocommit --single-transaction --opt -Q --no-data && mysqldump --no-tablespaces -u bi-com-_YQblc -h ma
  riadb-0f88e55c-5d54-4547-80be-baa8e910413e --port 3306 -p'XXXXXXXXXX' bi-com-careers-qa_76Ew
  6 --no-autocommit --single-transaction --opt -Q --no-create-info --ignore-table bi-com-careers-qa_76Ew6.ca
  che --ignore-table bi-com-careers-qa_76Ew6.cache_block --ignore-table bi-com-careers-qa_76Ew6.cache_bootst
  rap --ignore-table bi-com-careers-qa_76Ew6.cache_field --ignore-table bi-com-careers-qa_76Ew6.cache_filter
   --ignore-table bi-com-careers-qa_76Ew6.cache_form --ignore-table bi-com-careers-qa_76Ew6.cache_menu --ign
  ore-table bi-com-careers-qa_76Ew6.cache_page --ignore-table bi-com-careers-qa_76Ew6.cache_path --ignore-ta
  ble bi-com-careers-qa_76Ew6.cache_update --ignore-table bi-com-careers-qa_76Ew6.cache_views --ignore-table
   bi-com-careers-qa_76Ew6.cache_views_data ) | gzip > /tmp/bi-com-careers-qa.2023-09-12-12-09-25.sql.gz` fa
  iled!
  Unknown suffix '$' used for variable 'max_allowed_packet' (value '${MARIADB_MAX_ALLOWED_PACKET:-64M}')
  Warning: option 'max_allowed_packet': unsigned value 0 adjusted to 4096
  mysqldump: Error while setting value '${MARIADB_MAX_ALLOWED_PACKET:-64M}' to 'max_allowed_packet'

get:sql-dump [-c|--config CONFIG] [--blueprint [BLUEPRINT]] [--num-threads [NUM-THREADS]] [--variants [VARIANTS]] [--json [JSON]] [-s|--set [SET]] [--force [FORCE]] [-f|--fabfile [FABFILE]] [--skip-cache [SKIP-CACHE]] [--offline [OFFLINE]] [-a|--arguments [ARGUMENTS]] [--secret [SECRET]] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [--] <command>
stmh commented 12 months ago

this looks like a misconfiguration of the mqsql-docker image and is not a phab bug. (At least to the extent I understand the underlying issue)

It can be fixed by passing --no-defaults to mysqladmin. I updated the project configs

joachim-n commented 12 months ago

Yup, can confirm, I did a git pull on the project and now it works. Thanks!