Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing/improper behavior on "ddev rm" when db container is broken #1129

Closed
rfay opened this issue Sep 25, 2018 · 0 comments
Closed

Confusing/improper behavior on "ddev rm" when db container is broken #1129

rfay opened this issue Sep 25, 2018 · 0 comments
Milestone

Comments

@rfay
Copy link
Member

rfay commented Sep 25, 2018

Describe the bug

If the db container is broken (won't come up, usually due to corrupted database) and you get "db service stopped" on ddev list then:

ddev rm --R may fail with confusing errors where it immediately starts the project (to make a snapshot, but it hasn't said that yet). During the start, it fails, and never gets to the snapshot.

To Reproduce

  1. Make a snapshot of the good db
  2. Break a project's db container. ddev ssh -s db and rm /var/lib/mysql/mysql/*.MYD and ddev restart. ddev list should show "db container stopped". Pretty nasty thing to do to a database.
  3. ddev rm -R.

Result is

$ ddev rm -R
Starting ddev-t3git-db ... done
ddev-t3git-dba is up-to-date
ddev-t3git-web is up-to-date
Stopping ddev-router ... done
Removing ddev-router ... done
Network ddev_default is external, skipping
Creating ddev-router ... done

and ddev list shows just "db container stopped" again. No hint is given of what the problem or procedure is.

ddev rm -R --omit-snapshot solves the problem just fine.

Expected behavior

I expect ddev rm -R to always succeeed. It should probably just warn if a snapshot can't be created and continue to removal. It's also questionable whether we should always be creating the snapshot. Maybe we should ask.

Version and configuration information (please complete the following information):
ddev v1.2.0

Additional context
Add any other context about the problem here. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants