devgeniem / gdev

Helper script for developing containerized web applications.
https://devgeniem.github.io/gdev/
MIT License
29 stars 16 forks source link

If gdev is reloaded gdev sync will go to inconsistent state #11

Open onnimonni opened 8 years ago

onnimonni commented 8 years ago

Steps to reproduce:

$ gdev up
$ gdev reload
$ gdev sync

Then I can see that the sync fails:

$ gdev sync
INFO: Syncing files to data container with unison, using port 32779...
Contacting server...
Connected [//data-container//var/www/project -> //dev-machine//Users/henrikuittinen/Sources/asunnot.keva.fi]
Looking for changes
Fatal error: Warning: inconsistent state.
The archive file is missing on some hosts.
For safety, the remaining copies should be deleted.
  Archive ar33a3dac36ed37c0d952a172a45ded906 on host dev-machine should be DELETED
  Archive ar87132acb83c8baf3468e5ac97f28636b on host data-container is MISSING
Please delete archive files as appropriate and try again
or invoke Unison with -ignorearchives flag.
INFO: Sync is ready!

I think this can be fixed by adding -ignorearchives to the gdev sync command.

I think it happens because the data container is reloaded and it triggers data container hostname to change as well and because of that unison thinks it is inconsistent even though everthing is okay.