From 9b41f7a74e0e193efe58bfb1c4a162a8ede3674a Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 28 Apr 2018 01:21:26 -0400 Subject: [PATCH] fix: use updated fn-ps-is-app-running function to determine an application's status In some cases, a single allocation for a service may not be running, but the others will, and `is_app_running` will return the wrong thing. Closes #2772 --- plugins/ps/functions | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/ps/functions b/plugins/ps/functions index 9da0b8ab7..60604924f 100755 --- a/plugins/ps/functions +++ b/plugins/ps/functions @@ -91,10 +91,17 @@ ps_start() { declare desc="starts app" local APP="$1"; verify_app_name "$APP" local IMAGE_TAG=$(get_running_image_tag "$APP"); + local RUNNING if (is_deployed "$APP"); then plugn trigger pre-start "$APP" - if ! (is_app_running "$APP"); then + RUNNING="$(fn-ps-is-app-running "$APP")" + + if [[ "$RUNNING" == "mixed" ]]; then + dokku_log_warn "App is running in mixed mode, releasing" + fi + + if [[ "$RUNNING" != "true" ]]; then release_and_deploy "$APP" "$IMAGE_TAG" else dokku_log_warn "App $APP already running"