valentinocossar / trellis-database-uploads-migration

Ansible playbook for Trellis that manages database and uploads migration.
MIT License
94 stars 13 forks source link

Fail @ TASK [Pull exported database from staging to development (backup)] #4

Closed kculmback closed 7 years ago

kculmback commented 7 years ago

When trying to push to staging I receive the following error:

TASK [Pull exported database from staging to development (backup)] *************
System info:
  Ansible 2.3.1.0; Darwin
  Trellis at "Option to install WP-CLI packages"
---------------------------------------------------
checksum mismatch
fatal: [staging_host]: FAILED! => {"changed": false, "checksum": null, "dest": "/Users/kasey/www/rebuildingyourdream/site/database_backup", "failed": true, "file": "/srv/www/rebuildingyourdream.com/current/rebuildingyourdream_com_staging_2017_07_07_08_52_48.sql.gz", "md5sum": null, "remote_checksum": "411f9884ed72e854619f06e9dfcef2f47b41c3d8", "remote_md5sum": null}
    to retry, use: --limit @/Users/kasey/www/rebuildingyourdream/trellis/database-push.retry

PLAY RECAP *********************************************************************
staging_host               : ok=7    changed=4    unreachable=0    failed=1

I manually SSHed into the server and the sql dumps are there:

eb@rebuildingyourdream:/srv/www/rebuildingyourdream.com/current$ ls
CHANGELOG.md   rebuildingyourdream_com_db_dump.sql.gz
composer.json  rebuildingyourdream_com_staging_2017_07_07_08_50_08.sql.gz
composer.lock  rebuildingyourdream_com_staging_2017_07_07_08_52_48.sql.gz
config         vendor
LICENSE.md     web
README.md      wp-cli.yml

Any help with this would be greatly appreciated. I'll admit, I'm a little new to this, so hopefully I'm not missing something obvious. Let me know if you need anymore information!

valentinocossar commented 7 years ago

Hi, I don't know why (maybe it's an Ansible bug) but with Ansible 2.3.1.0 the tool doesn't work, it creates all the database dumps and does all the things, but can't download the dumps because generates a checksum error, as you reported.

This is the table with some of the tests I've done:

Trellis version Ansible version Passed Why not passed
0.9.6 2.0.2.0 Yes
0.9.9 2.0.2.0 Yes
0.9.9 2.2.0.0 Yes
0.9.9 2.2.1.0 No Not tested due to Trellis requirements
0.9.9 2.2.2.0 Yes
0.9.9 2.2.3.0 Yes
0.9.9 2.3.0.0 Yes
0.9.9 2.3.1.0 No Checksum error
1.0.0-rc.1 2.2.3.0 Yes
1.0.0-rc.1 2.3.0.0 Yes

Ansible was installed via pip and not Homebrew, if you are using Homebrew to install Ansible, I recommend you to install python and passlib using Homebrew and then install Ansible using pip (pip install ansible==2.2.3.0).

Soon I'll try to figure out why the tool doesn't work with Ansible 2.3.1.0.

kculmback commented 7 years ago

Thanks for the info @valentinocossar! I switched to Ansible 2.2.3 and everything worked. Thanks for your work on this!

valentinocossar commented 7 years ago

Thank you for using it, any kind of feedback or contribution is appreciated! 🙂