deis/deis — pull request #2307 by carmstrong (2014-10-29 02:00:26+00:00)
Title: fix(deisctl): use wait groups for stopping and uninstalling store

When we start deis-store components, we do so in a specific order to ensure they come up properly. Unfortunately, we don't do this for stop/uninstall, and bring them all down simultaneously. This seems to result in an issue that occurs when upgrading installations where the components don't all come back properly (see #2300, #2301, #2294, #2286). This PR changes deisctl to use wait groups in the stop and uninstall commands to also stop these services in an optimal order. Additionally, this PR also updates the "upgrading Deis" instructions to instruct users to stop services before uninstalling them. This gives components the opportunity to exit in a clean state rather than be forced down uncleanly.

Note that services should always be stopped before an uninstall to guarantee a safe shutdown, but we use a specific start order for uninstall just in case this helps when people don't stop first.

Unfortunately this doesn't help people who are upgrading from v0.14.x to v0.15.0 (as the fix will only be in upcoming releases of deisctl), but a note was added to the "upgrading Deis" instructions with a workaround to address the issue.

TESTING: I tested this PR by installing v0.15.0 of Deis, performing a `deisctl install platform && deisctl start platform` followed by `deisctl stop platform && deisctl uninstall platform`, and then again a `deisctl install platform && deisctl start platform`. Everything came back happily.

closes #2300
refs #2301, refs #2294, refs #2286